Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function killPlayer(hit) -- The name of the function and when the event is triggered
- if hit.Parent:FindFirstChild("Humanoid") then -- If the script finds a child called humanoid on hit.Parent
- hit.Parent.Humanoid.Health = nil -- Sets the touching part's health to nil (no value)
- end
- end)
- script.Parent.Touched:Connect(killPlayer) -- Runs the function
Advertisement
Add Comment
Please, Sign In to add comment