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
COMMUNITY QUESTION
this is easy script but idk why it wont work it's a script in side a tool ,how do i fix?
1 answer
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!)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
its not disabled
What error are you getting? You might need to put a closing parenthesis after the last end statement.
theres a parenthesis for the last end
the parent parameter of Instance.new() is decaperated, instead set the parent lasr