Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Brick waiting for touch?

I need a brick to wait for touch but also receive the hit argument/.

This code would just wait for touch, but receive no arguments:

Part.Touched:wait()

And this code would detect touch but not wait:

Part.Touched:connect(function(Hit)

end)

I really just need it to wait for a touch, but also get the Hit argument.

3 comments

0

You want the script to, after a period of time, wait a few seconds before being able to be touched again?

0

may you please specify what your asking. IF you want it to wait for a touch then use a listener. Im confused what your asking

0

@koolkid80299 "I really just need it to wait for a touch, but also get the Hit argument." I clearly specified what I wanted.

1 answer

✓ Accepted answer

The wait method of events actually does return the arguments.

local hit = Part.Touched:wait()

2 comments

0

Heh, interesting. I'll have to try that out sometime.

0

It's really helpful when defining character, local character = player.Character or player.CharacterAdded:wait()

This discussion is preserved as it was. New answers, comments, and votes are closed.