local di = true script.Parent.Activated:Connect(function() while di == true do wait() script.Parent.RightHand.ParticleEmitter.Rate = script.Parent.RightHand.ParticleEmitter.Rate + .12 end local p = Instance.new("Part",game.Workspace) local x = Instance.new("BodyVelocity",p) end
Alright, here's the modified code. Not sure if this is the answer, but here it is.
local di = true script.Parent.Activated:Connect(function () while di == true do wait() script.Parent.RightHand.ParticleEmitter.Rate = script.Parent.RightHand.ParticleEmitter.Rate + .12 end local p = Instance.new("Part") p.Parent = game.Workspace local x = Instance.new("BodyVelocity",p) end)
Here's some things in mind.
The way you used the Instance.new()
constructor function is deprecated. It's better to parent it after the creation. (or later)
A right parentheses )
was forgotten at line 11, column 4, since you didn't create the callback function earlier (but that works!)