Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Does Filtering Enabled automatically secure Leaderstats?

So if I create a leaderboard with FilteringEnabled checked to ON for my game and type the code

game.Players.PlayerAdded:Connect(function(player)
	local stats = Instance.new("IntValue", player)
	stats.Name = "leaderstats"
	
	local Money = Instance.new("IntValue", stats)
	Money.Name = "Money"
	Money.Value = 20
	
	local Role = Instance.new("StringValue", stats)
	Role.Name = "Rank"
	Role.Value = "Owner"
end)

And if I also make a simple value changing script whenever a text button is clicked by the following:

--Debounce
local debounceboo = true

script.Parent.MouseButton1Click:Connect(function()
	if debounceboo == true then
		game.Players.LocalPlayer.leaderstats.Money.Value = game.Players.LocalPlayer.leaderstats.Money.Value - 10
		if game.Players.LocalPlayer.leaderstats.Money.Value == 0 then
			debounceboo = false
		end
	end
end)

Will Filtering Enabled automatically prevent users from changing in-game values of their leaderstats, leading to activate that mousebuttonclick many times more than they could've before with their money.

2 comments

0

Player data should never be manipulated client side. It is not safe. FE stops client changes from replicating back to the server which is good. You should be using remote events / functions to ask to server to do a task which is then can validate then perform the action.

0

Right, yes. I have expierence using RemoteEvents. I just didn't know if it automatically stopped people from changing in game values. But thanks for the info.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.