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

Add Fire to Certain player not working?

Asked by 4 years ago
Edited 4 years ago

I'm trying to make something that will add fire to me when I spawn. I'm a bad scripter, so I might be missing variables functions or something.

This is the code I attempted:

if plr.name == "Blxefirx" then
    Part = part.Parent:FindFirstChild("UpperTorso")
    Fire = Instance.new("Fire")
    Fire.Parent = Part
    Fire.Size = 10
    Fire.Heat = 25
    Fire.Color = Color3.fromRGB(76, 153, 229)
    Fire.SecondaryColor = Color3.fromRGB(76, 153, 229)
    Fire.Name = "Creator Fire"
end

Please, can someone help? Thanks, Blxefirx

2 answers

Log in to vote
0
Answered by 4 years ago

Maybe try this. Place a part above the Spawn that you touch. Place a Script inside the part.

script.Parent.Touched:Connect(function(hit)
if hit.Parent.Name == "Blxfire" then
local val = Instance. new("Fire")
val.Parent = game.Workspace[hit.Parent.Name].UpperTorso
end
end)

If that doesn't work a search a YouTube video tutorial.

Ad
Log in to vote
0
Answered by
haba_nero 386 Moderation Voter
4 years ago

Try this simple code:

game.Players.PlayerAdded:Connect(function(plr)
    wait(1)
    local Char = player.Character
    if plr.Name == "Blxfire" then
        local Part = Char:FindFirstChild("HumanoidRootPart")
        local Fire = Instance.new("Fire", Part)
        --Add details of fire later.. Its best to test if this works!
    end
end)

If this does not work, try searching up a youtube tutorial. They are a big help! -TheLastHabanero

Answer this question