So I have a string value ("Role") in StarterCharacterScripts that is parented to another string value ("Plr") -- (not sure if this is related to the problem)
The script I'm trying is in StarterPlayerScripts. I want it to change the value of "Role" but it doesn't work and I'm wondering what I'm doing wrong:
while true do wait (.0001) if script.Parent.Parent.TeamColor == BrickColor.new("White") then script.Parent.Parent.Character.Plr.Role.Value = "Medic" end end
Try:
local player = game.Players.LocalPlayer repeat wait() until player.Character while true do wait (.0001) if player.TeamColor == BrickColor.new("White") then player.Character.Plr.Role.Value = "Medic" end end
Make sure it's a localscript