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

How to find who clicks a button to be able to manipulate their BodyVelocity?

Asked by
Raeso 5
5 years ago
script.Parent.MouseClick:Connect(function()
print("Clicked")
end)

How would I use this function to determine who clicked it and create a BodyVelocity in their LowerTorso?

0
MouseClick passes the player who clicked, so in between the function() do function(player) User#19524 175 — 5y

1 answer

Log in to vote
3
Answered by 5 years ago

To find the person who clicked you do:

script.Parent.MouseClick:Connect(function(player)
print("Player who clicked is" ..player)
end)

Ad

Answer this question