Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you have an input while you are touching the block, rather than hitting it?

Asked by 10 years ago

How do you have an input while you are touching the block, rather than hitting it?

0
Do you mean to do something repeatedly until the block is not being touched anymore? If not, hitting and touching something are the exact same thing in Lua. DaMrNelson 130 — 10y

1 answer

Log in to vote
0
Answered by
Kozero 120
10 years ago

If you mean't by a Robloxian touching it and not anything else you would type this.

function Touched(hit)
if hit.Parent:FindFirstChild("Humanoid")
--the code you would write for what you want to happen when it's touched
end
script.Parent.Touched:connect(Touched)

Make sure you put the script in the part.

Ad

Answer this question