It's a remoteEvent (Because I have to change a gui)
What's wrong? I keep getting the error 'Unable to cast value to Object' Line 8
local deb = false
function onTouch(part)
if deb == false then
deb = true
local human = part.Parent:findFirstChild("Humanoid")
if (human == nil) then return end
script.Parent.RemoteEvent:FireClient(human.Parent.Name)
wait(1)
deb = false
end
end
script.Parent.Touched:connect(onTouch)

1 comment
thx