I’m using a Server script in the workspace
I need to player so I can add the Coins and Exp to their leaderstats
local CoinValue = script.Parent.Parent.Parent.Parent.Parent.Coins
local ExpValues = script.Parent.Parent.Parent.Parent.Parent.Exp
script.Parent.MouseButton1Click:Connect(function(click)
end)
I don’t know what the argument “click” means, but that is where the player who clicked the clickdetector is given.
Or if you’re using gui then use a local script and remote events, as @IFthenElse246 said
“.MouseClick” is the event for ClickDetector instances, in this case “.MouseButton1Click” is being used, which is the event for GuiButton objects, this event doesn’t have any parameters (so click would point to nil).