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.

01local GRS = game.ReplicatedStorage.GhostRiderStuff
02local HF = GRS.HeadFlame
03 
04script.Parent.Touched:connect(function(hit)
05    print("Hello")
06    local HFt = HF:Clone().Parent = hit.Parent:FindFirstChild("Head")
07 
08 
09 
10end)

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:

01local GRS = game.ReplicatedStorage.GhostRiderStuff
02local HF = GRS.HeadFlame
03 
04script.Parent.Touched:connect(function(hit)
05    print("Hello")
06    local HFt = HF:Clone()
07    HFt.Parent = hit.Parent:FindFirstChild("Head")
08 
09 
10 
11end)
0
Well I'm dumb. Thank you. TheLightningRises 56 — 6y
Ad

Answer this question