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

What's wrong with my script?

Asked by 10 years ago

This is my script. The goal is to make this one part that has the "Fire" from basic objects inside move forward.

I have never CFramed something using a script, so I'm not sure if I did it right, although I did look at other questions asked over the matter.

Even though I could just use a Vector within the for i = 1,85 loop, the part would go over instead of through me.

The part named Flame does not move, so I was wondering why.


part = script.Parent part2 = script.Parent.Parent.PlateDupe Flame = script.Parent.Parent.Flame fire = script.Parent.Parent.Flame.Fire function onTouch(part) wait() Flame.Script.Disabled = false part.Position = Vector3.new(999, 999, 999) part.Transparency = 1 part.CanCollide = false part.Anchored = true part2.BrickColor = BrickColor.new(255, 0, 0) part2.Transparency = .5 fire.Enabled = true wait() for i = 1,85 do fire.Size = fire.Size + .2 wait(.005) end Flame.CFrame = CFrame.new(16.8, 20.29, 13) wait() fire.Enabled = false end part.Touched:connect(onTouch)

Answer this question