Forgive me if I'm an idiot, and my code is messy.
I tried using a LocalScript inside of StarterCharacterScripts that uses math.random(1,3) to choose a death message, which worked, but I wasn't satisfied with it, as the death messages are local.
How would I go about doing global randomized death messages? I was thinking of using a RemoteEvent for a server-sided Script. Would that work? Is there a much simpler option that I'm not seeing?
LocalScript inside of StarterCharacterScripts:
game.Players.LocalPlayer.Character.Humanoid.Died:Connect(function()
local mr = math.random(1,3)
local red = BrickColor.new('Bright red')
local deadPlayer = game.Players.LocalPlayer.Character.Name
if mr == 1 then
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = deadPlayer.. " tripped!";
Font = Enum.Font.Highway;
Color = red.Color;
FontSize = Enum.FontSize.Size96;
})
end
if mr == 2 then
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = deadPlayer.. " stepped on a landmine!";
Font = Enum.Font.Highway;
Color = red.Color;
FontSize = Enum.FontSize.Size96;
})
end
if mr == 3 then
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = deadPlayer.. " found a Creeper!";
Font = Enum.Font.Highway;
Color = red.Color;
FontSize = Enum.FontSize.Size96;
})
end
end)
Also, my main is "LukeMasterVader", if you're curious. Haven't used this site in years, so I forgot my password, and I don't even know what email I signed up with.
