So i got a localscript in a textbutton (the textbutton is located in GUI -> Frame), when i press on the button in Roblox Studio it changes but when i go in-game via the website and press on the button it won't change?
Value name = P
plr = game.Players.LocalPlayer function onClicked() plr.P.Value = 5 end script.Parent.MouseButton1Down:connect(onClicked)
Hi!
Seems like you're trying to change a server-value via a LocalScript, which isn't possible :( To fire functions that operate on a server-level, try using a RemoteEvent, this allows you to fire functions from a LocalScript, whilst executing them on the server.
The reason it works on studio is that ROBLOX Studio's test function plays on a local server, meaning any changes you see there only change for the one executing it.
Examples of Server-functions are: TeamChange, Respawn Character, Teleport, Set Value, etc. If you decide to fire those via a LocalScript, you'll need a RemoteEvent!
I hope it works out, and good luck!