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

Struggling to insert fire into a brick in a script?

Asked by 7 years ago

I apologize for this not containing my code that I need help with, but I'm not sure what function to even use. The script would insert the basic object "fire" into "Player.Character.Head". What function would I call on to do this? Thanks very much for help, sorry again that this doesn't contain much of my code. (I hate to just ask for people to do it for me)

1 answer

Log in to vote
1
Answered by 7 years ago

Well depends if you want the player to join and then have the fire on their head or not. If you want the fire to be on player's head on join then put this normal script in Workspace or in ServerScriptService. In this case, we would use PlayerAdded

game.Players.PlayerAdded:connect(function(p)
    wait()
    local H = p:FindFirstChild("Character").Head --I'm not sure if this is how u get character beacuse I never done it before. If not please change.
    local newbaby = Instance.new("Fire")
    newbaby.Parent = H
end)

This will create a fire on join and makes it so that the fire is on the head of the player (character).

If this helped please upvote and accept the answer, I'm not sure if that's how you get the character though, but you get the idea.

0
Thank you! Instance is the way to do it, just couldn't remember it. noob1126 34 — 7y
0
Ok np BlackOrange3343 2676 — 7y
0
Character usually won't change so although FindFirstChild is safer it isn't necessary; you can simply do "p.Character" iiFlamingIcicle 45 — 7y
0
true BlackOrange3343 2676 — 7y
Ad

Answer this question