Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My Chat on death script only says the same thing?

Asked by 1 year ago
Edited 1 year ago

Basically, it only says "Woahh, Yankee with no brim" whenever i die instead of any of the other ones.

while true do -- makes it constantly check
    wait(0.1)
    local player = game.Players.LocalPlayer
local Char = player.Character or player:WaitForCharacter()








if Char.Humanoid.Health <= 0 then -- checks for death
    local rand = math.random(1, 4)

    if rand == 1 then
   deathMsg = "Giggity"

   else if rand == 2 then
       deathMsg = "I sniff my armpits at night"

       else if rand == 3 then
           deathMsg = "Roses are red, violets are blue, im not saying you smell bad but you need perfume"

           else if rand == 4 then
               deathMsg = "Woahh, Yankee with no brim"

end
    game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(deathMsg, "All") -- says death message
    wait(6) -- cooldown
    end
   end
    end
end
end
0
change else if to esleif SuperPuiu 497 — 1y
0
as the person above said, you need to write "elseif" without the space PaleNoobs 37 — 1y
0
oh tty Black_Magic2533 104 — 1y

Answer this question