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

Where do I put this script in?

Asked by 10 years ago

location = CFrame.new(0, 0, 0) players = game:GetService("Players") for i, v in pairs(players:GetChildren()) do if v.Character() ~= nil then char = v.Character if char:FindFirstChild("Torso") ~= nil then

        v.Torso.Anchored = true

        wait()

        v.Torso.CFrame = location

        wait()
        v.Torso.Anchored = false

    end

end

end

I need to add a part where if a player dies a small message at the top of the screen pops up saying "Alpha Died or "Bravo died"

2 answers

Log in to vote
0
Answered by 10 years ago

You can create a Hint (object) to send this message. Though hints are under appreciated, since you can use Gui's instead. Anyhow, here's how to do it with Hints :

location = CFrame.new(0, 0, 0) 
players = game:GetService("Players") 
for i, v in pairs(players:GetChildren()) do
    if v.Character() ~= nil then 
        char = v.Character 
        if char:FindFirstChild("Torso") ~= nil then
            char.Torso.Anchored = true
            wait()
            char.Torso.CFrame = location
                wait()
                char.Torso.Anchored = false
            local h = Instance.new("Hint",workspace)
            h.Text = v.Name.." has died."
            wait(5)
            h:Destroy()
        end
    end
end

Ad
Log in to vote
0
Answered by 10 years ago

Why is everyone making Murder games now?

Answer this question