leaderstats is not a valid member of Player. How to fix??
- local repStorage = game:GetService("ReplicatedStorage")
- local remote = repStorage:FindFirstChild("CoinClick")
- local button = script.Parent
- local debounce = false
- button.MouseButton1Click:Connect(function()
- if not debounce then
- debounce = true
- local playerPoint = game.Players.LocalPlayer.leaderstats.Coins
- remote:FireServer(playerPoint)
- wait(0.01)
- debounce = false
- end
- end)
I am getting a error and idk how to fix this if anyone knows please help me really need to fix this problem.
- leaderstats is not a valid member of Player
- Stack Begin
- Script 'Players.l3gendrasp.PlayerGui.Button.TextButton.LocalScript', Line 11
- Stack End