Im trying to make a pad, and if your character touches it, it executes a script.
✓ ANSWER ACCEPTED
How do you make a button that executes scripts on touch?
1 answer
✓ Accepted answer
You can use the .Touched method of a BasePart (touchpad) in order to execute a piece of code when that BasePart is touched.
Example:
local part = workspace.Touchpad
part.Touched:Connect(function(hit)
if hit and hit.Parent:FindFirstChild("Humanoid") then -- check if part is a character
--execute code here
end
end)
Hope I helped. If you have any questions please let me know.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks