Roblox Forum banner

error: 'localplayer is not a valid member of Players "Players"'

171 Views 0 Replies 1 Participant Last post by  Carterh
Im trying to set a variable as a value which gets placed into the local player but i keep getting an error for it
code:

Torso = workspace.Noob.Torso
Noob = workspace.Noob
knife = game.StarterPack.Knife
local player = game:GetService("Players").LocalPlayer
stabs = player.Stabs
db = false

function OnTouch(knife)
if db == false then
db = true
Noob.Humanoid:TakeDamage(10)
wait(.5)
db = false
end
end

script.Parent.Touched:Connect(OnTouch)
1 - 1 of 1 Posts
1 - 1 of 1 Posts
Top