Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

(Script 'ServerScriptService.DataStore', Line 21) when making a simulator what do i do?

Asked by 5 years ago

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)

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 :/) the8bitdude11 358 — 5y
0
unless you didnt post the server script the8bitdude11 358 — 5y

Answer this question