I have a value in a folder called PlayerStats called Career. It says their career I guess is what it is. Anyways this script here, which is just supposed to clone a script that sits in replicatedstorage into the players gui does not clone when it should. No output errors.
function onPlayerEntered(player) if player:WaitForChild("PlayerStats").Career.Value == "CEO" then local cc = game.ReplicatedStorage.CEO:Clone() cc.Parent = player.PlayerGui end end game.Players.PlayerAdded:connect(onPlayerEntered)
Whats the issue here? Any help is appreciated.
Edit: Title Typo
if player:WaitForChild("PlayerStats").Career.Value == "CEO" then
Make sure its the correct path. Perhaps the player does not have an object named 'PlayerStats'. This is often the case for me when this happens. If there are no errors, its either the if statement not triggering, or the script is disabled.