Can you make :Wait() only connect if a certain parameter of the event has a certain value?
Y'know the RobloxScriptService thing :Wait()?
like
2 | game:GetService( "Workspace" ).Part.Touched:Wait() |
I was wondering if you could like, make it so that the event would only get through :Wait() if a parameter of it had a certain value.
I mean like sorta like
01 | script.Parent.Touched:Connect( function (otherThing) |
02 | local player = game:GetService( "Players" ):GetPlayerFromCharacter(otherThing.Parent) |
04 | game:GetService( "ReplicatedStorage" ).TouchEvent:FireClient(player) |
06 | script.Parent.TouchEnded:Wait(otherPart = otherThing) |
08 | game:GetService( "ReplicatedStorage" ).MoveEvent:FireClient(player) |
Soo.... yes or no?