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

Help with changing stats with FilteringEnabled? [CLOSED]

Asked by
Admin8483 -21
7 years ago
Edited 7 years ago

My game is based off of leaderstats, and I need this code to change stats for that specific player that clicked on all clients, not just localy. This is the LocalScript in Gui

script.Parent.MouseButton1Click:connect(function()
    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    local ClickEvent = ReplicatedStorage:WaitForChild("ClickEvent")
    ClickEvent:FireServer()
end)

This is the ServerScript in Workspace

local ReplicatedStorage = game:GetService("ReplicatedStorage")
ClickEvent = ReplicatedStorage:WaitForChild("ClickEvent")

local function onClickFired(player)
    local clickz = player.leaderstats.Clicks.Value
    clickz = clickz + 1
    local point = player.leaderstats.Points.Value
    point = point + 1
end

ClickEvent.OnServerEvent:Connect(onClickFired)

I REALLY need your help.

while true do
wait(1)
If game.Players.Admin8483.Questions["Help with changing stats with FilteringEnabled?'].Answered.Value == true then
local Answerer = game.Players.Admin8483.Questions["Help with changing stats with FilteringEnabled?'].AcceptedAnswer.Answerer.Value
print(Answerer.." is the best person ever!")
else
wait(1)
end
--Lol just something made by me, the noobish scripter
0
Are there any errors? Pejorem 164 — 7y

1 answer

Log in to vote
0
Answered by
Admin8483 -21
7 years ago

Lol I found out that I can't use the local Blah = Path. I have to write the paths over and over. I have been getting similar errors recently which makes games harder to make.

Ad

Answer this question