Can a local script edit a value?

Hello, so before i begin coding a whole menu , i just have a question , can a local script edit a value located in a GUI?

1 Like

Yes, but it’ll only be on the local player (of course)

1 Like

It depends if you have filtering enabled on. If you do, any changes will be local, otherwise, it will also change for the server.

FilteringEnabled is forced, you can’t turn it off no matter what, so changes are always local regardless of the property.

1 Like

If the value is inside the player’s GUI then it shouldn’t matter anyway, since only the player should have access to that value object.

1 Like

you can turn off filtering enabled if you do it when making the game rather than from a script

1 Like

Wdym, like edit text value? if so yes you can. If you mean edit value through a local script there comes 2 questions,

do you want the value to be only visible on the client, If so then you can change it through a local script
do you want the value to be visible to everyone, If so then theres a way you can change through a local script here’s how:

-- local script
local remote = game.ReplicatedStorage.sendData
local valueToChange

valueToChange = 10

remote:FireServer(valueToChange)

-- Server script

local remote = game.ReplicatedStorage.sendData

remote.OnServerEvent:Connect(function(player, valueToChange)
    local value = player.PATH_TO_THE_VALUE = valueToChange
end)

Hope i helped!

3 Likes

No you can’t, it’s forced. No matter what. Seems you’re 2 years late, but that is fine.

Experimental Mode = non-Filtering Enabled btw.

“FE”/“Filtering Enabled” and “Experimental Mode” are archaic terms now anyway. Games are just games. You can’t distinguish between a “FE game” or a “non-FE game” anymore.

Local scripts can edit any values on the client, the only thing you need to remember is that this change will not be visible to the server, which is not important in this case since I assume its related to the GUI.

3 Likes

Yes, the client can edit anything they see. If you’re talking about variables in server scripts, then no. But if you’re talking about ObjectValues then yeah. However, because of Filtering Enabled only the client will see the changes they made and everyone else won’t.

1 Like