game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() local bc = BrickColor.new("Neon orange") game.StarterGui:SetCore("ChatMakeSystemMessage", { Text = "Not bad... For an idiot that is..." or "Here goes another life..." ; Font = Enum.Font.Arial; Color = bc.Color; FontSize = Enum.FontSize.Size96; }) end) end) end)
When I input the value of text, i expected the value to change everytime i die. should i use math.random?
Hey RealRexTeam,
local strings = {"Whatever", "Ok, man..."} local string = strings[math.random(#strings)]; print(string);
The reason yours doesn't work is because the or operator is like a ternary operator in which if the first option doesn't work it goes for the second one, it's useful for :FindFirstChild(), so if it couldn't find the first object, it would go for the second one.
~~ KingLoneCat