I’m trying to make a system where if a map has a certain difficulty, the UIStroke of the text changes, but it just doesn’t work and I don’t know how to fix it.
Error:
Players.InkBrains.PlayerGui.Vote.MapVoteGui.VotingClient:29: attempt to index nil with 'Color' - Client - VotingClient:29
Code:
newMapFrame.MapDifficulty.Text = map.Configuration.Difficulty.Value
if map.Configuration.Difficulty.Value == "Easy" then
newMapFrame.MapDifficulty.Text.UIStroke.Color = Color3.fromRGB(81, 255, 0)
elseif map.map.Configuration.Difficulty.Value == "Normal" then
newMapFrame.MapDifficulty.Text.UIStroke.Color = Color3.fromRGB(255, 157, 0)
elseif map.Configuration.Difficulty.Value == "Hard" then
newMapFrame.MapDifficulty.Text.UIStroke.Color = Color3.fromRGB(255, 0, 0)
end
While looking at this I found the issue, for some reason I put “.text” after referencing the text label instead of the UIStroke. Thank you for your help!