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

How to keep items with the player?

Asked by 10 years ago

The below script gives a player who has stepped on the button and has the firePass fire particles around their torso, but when they die they lose the particles. Is there a way for the player to keep their particles on them forever, until they leave.

local firePass = 194930756

game.Players.PlayerAdded:connect(function(plr)
    function fireisAuthenticated(plr)
        return game:GetService("GamePassService"):PlayerHasPass(plr, firePass)
    end

    script.Parent.Touched:connect(function(hit)
        local player = hit.Parent
        if player then
            local torso = player:FindFirstChild("Torso")
            if torso then
                if fireisAuthenticated(plr) then
                    player.Fire.Value = true
                    local fire = Instance.new("Fire", torso)
                    fire.Color = Color3.new(0, 170/255, 1)
                    fire.SecondaryColor = Color3.new(0, 0, 0)
                    fire.Heat = 25
                    fire.Size = 10
                end
            else
                print("You need the Fire Pass for this to work")
            end
        end
    end)
end)

Answer this question