I am currently trying to see if I completely understand how the Debounce and seeing if the it's a player who touched the part. But when I run the script, it says attempt to call method 'Touched' (a userdata value)
Here's the code,
function OnTouched(part)
Debounce = false
player = part.Parent:FindFirstChild("Humanoid")
if not player then
player2 = player.Parent:FindFirstChild("Humanoid")
end
if not Debounce then
Debounce = true
if player or player2 then
print("It worked!")
end
wait(3)
end
Debounce = false
end
script.Parent:Touched(OnTouch)

2 comments
To explain further, you do not call events. You subscribe a function to them using their ":connect()" method. Roblox will call your function back whenever the event triggers. Such a function is known as a "Callback", or a "Listener".
10 points to griffindor.