Hello, I'm trying to make a script that means upon joining the game, a player is given a GUI, when they click a button it changes a value with changes another value inside of a folder of all the player stats. When I test this game for myself the only thing changing is the PSA, the player.Name value is loaded, but not it's actual value.
Here's the code:
Players.PlayerAdded:Connect(function(player)
local NewThingName = ThingName:Clone()
NewThingName.Parent = game.Workspace.ThingValues
NewThingName.Value = PSA.Value
wait (1)
NewThingName.Name = player.Name
if PSA.Value == "Thing1" then
print ("not thing2")
elseif NewThingName.Value == "Thing2" then
print ("Hello!")
end
end)
PSA is a string value inside the gui when a function calls to change it's value, it works fine, it's the 'NewThingName' that is named after the player that won't work.

1 comment
Please show your whoel script.