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?

1 comment

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.