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.
01 | local GRS = game.ReplicatedStorage.GhostRiderStuff |
02 | local HF = GRS.HeadFlame |
03 |
04 | script.Parent.Touched:connect( function (hit) |
05 | print ( "Hello" ) |
06 | local HFt = HF:Clone().Parent = hit.Parent:FindFirstChild( "Head" ) |
07 |
08 |
09 |
10 | end ) |
You tried to define a variable and it's parent at the same time. Instead it should look like:
01 | local GRS = game.ReplicatedStorage.GhostRiderStuff |
02 | local HF = GRS.HeadFlame |
03 |
04 | script.Parent.Touched:connect( function (hit) |
05 | print ( "Hello" ) |
06 | local HFt = HF:Clone() |
07 | HFt.Parent = hit.Parent:FindFirstChild( "Head" ) |
08 |
09 |
10 |
11 | end ) |