I have a surface GUI in workspace, it's a shop and it has a buy button in it. When the buy button is clicked I want it to fireserver to purchase the weapon for the player. When it's clicked it can't get the player that clicked it though. Any help?
script.Parent.MouseButton1Click:connect(function(Player) print("Button1 Clicked"..Player.Name) end)
connectis deprecated, use
local Player = game.Players.LocalPlayer script.Parent.MouseButton1Click:Connect(function() print("Button1 Clicked"..Player.Name) end)