Hello, I am making a menu tool. So I am using the Equipped Event.
So when you equip the tool a gui will appear at the player's screen. I am using a Script and I made a GUI.
What I wan't to know how I will get the player. You can't use game.Players.LocalPlayer in scripts. How do I get the player?
Script:
tool = script.Parent
menu = script.Parent.Menu
tool.Equipped:connect(function(player)
menu:Clone().Parent = player:WaitForChild("PlayerGui")
end)
tool.Unequipped:connect(function(player)
player:WaitForChild("PlayerGui"):WaitForChild("Menu"):Destroy()
end)
Please help me.

1 comment
Thanks. ;)