I tried to make a script where when they touch a part, the number of clicks they had turned into the number of coins they have. Can someone tell me why this script does not work?
local Part = script.Parent
local function hit()
game.Players.LocalPlayer.leaderstats.Coins.Value = game.Players.LocalPlayer.leaderstats.Clicks.Value
end
Part.Touched:Connect(hit)
Thanks!

3 comments
Nothing happened no error either
Nothing happened no error either
He means that this code should be a normal script inside the part.