script.Parent.MouseButton1Click:Connect(function(player)
print(player)
end)
result:
its a local script inside of a screen gui
script.Parent.MouseButton1Click:Connect(function(player)
print(player)
end)
result:
its a local script inside of a screen gui
you can get the player by game.Players.LocalPlayer since it’s done on the local script instead of grabbing the player via MouseButton1Click
true mousebutton1click event does not return player try this:
Make sure its in a local script
script.Parent.MouseButton1Click:Connect(function()
local player = game:GetService("Players").LocalPlayer
print(player)
end)
Well, I was scrolling through the devforum and i saw a post about mouse button 1 click which stated that it does return the player who clicked it. Thank you for clearing it up
You most likely saw ClickDetector.MouseClick
as that returns the player
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.