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

Clone isn't moving into players head?

Asked by 6 years ago

I want the players head to set on fire when they touch this brick but, the clone isn't moving it.

This is my script.

local GRS = game.ReplicatedStorage.GhostRiderStuff
local HF = GRS.HeadFlame

script.Parent.Touched:connect(function(hit)
    print("Hello")
    local HFt = HF:Clone().Parent = hit.Parent:FindFirstChild("Head")



end)

1 answer

Log in to vote
1
Answered by 6 years ago

You tried to define a variable and it's parent at the same time. Instead it should look like:

local GRS = game.ReplicatedStorage.GhostRiderStuff
local HF = GRS.HeadFlame

script.Parent.Touched:connect(function(hit)
    print("Hello")
    local HFt = HF:Clone()
    HFt.Parent = hit.Parent:FindFirstChild("Head")



end)

0
Well I'm dumb. Thank you. TheLightningRises 56 — 6y
Ad

Answer this question