How do you have an input while you are touching the block, rather than hitting it?
COMMUNITY QUESTION
How do you have an input while you are touching the block, rather than hitting it?
1 answer
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
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.