local repstorage = game:GetService("ReplicatedStorage") local remote = repstorage:FindFirstChild("ButtonClick")

local button = script.Parent

local debounce = false

button.MouseButton1Click:Connect(function() if not debounce then debounce = true local playerPoint = game.players.LocalPlayer.leaderstats.Points remote:FireServer(playerPoint) wait(0.01) debounce = false end end)

2 comments

0

server scripts cannot access the LocalPlayer, use a local script and use a remote to send the info (im also confused about the fact if this is a local script or a server script becuase your accessing client stuff but also 'ServerScriptService' is in the error :/)

0

unless you didnt post the server script