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

Why does this work with FilteringEnabled turned on?

Asked by 7 years ago

I have a leaderstats script in **ServerScriptService **that works with FE on:

game.Players.PlayerAdded:connect(function(plr)
    local stats = Instance.new("Folder", plr)
    stats.Name = 'leaderstats'
    local stats1 = Instance.new("IntValue", stats)
    stats1.Name = 'Score'
end)

But then I have a script that works but is not supposed to work with FE on?

script.Parent.ClickDetector.mouseClick:connect(function(plr)
    plr.leaderstats.Score.Value = plr.leaderstats.Score.Value + 10
end)

Help please?

0
A ClickDetector now is FE compatible and it passes the player who clicked it so this will work. Also mouseClick is deprecated please use MouseClick. User#5423 17 — 7y

Answer this question