sword.Value = itemName.Text
print(sword.Value)
print(itemName.Text)
This code sets the players sword.Value to whatever the itemName.Text is. Now for some reason, whenever I fire this code in a roblox game (NOT FROM STUDIO/PLAY SOLO) it prints 'Claymore' and 'Claymore' but when I go into the console and type 'print(game.Players.NinjoOnline.PlayerFolder.Sword.Value)' it still just prints 'Sword'
By default, sword.Value is 'Sword' but I'm changing what its value is, yet it refuses to change. Could this be because of filtering enabled? I tried to put this code in a LocalScript, doesnt working, tried using a RemoteEvent to the server, still doesn't work. I'm stumped as to why it doesn't work.

3 comments
This probably is an issue with where / how you are running the code.
We don't know how your script works. You just sent 1% of the work.
There's no reason for this not to work tho. Literally the only other thing I have is when the player joins there sword.Value is Sword. Other than that this all I have. When they click a button thats the code, so it should have no reason why its not working