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

this is easy script but idk why it wont work it's a script in side a tool ,how do i fix?

Asked by 6 years ago
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
0
its not disabled helleric -3 — 6y
0
What error are you getting? You might need to put a closing parenthesis after the last end statement. xtreme359yt 0 — 6y
0
theres a parenthesis for the last end User#23365 30 — 6y
0
the parent parameter of Instance.new() is decaperated, instead set the parent lasr User#23365 30 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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!)

Ad

Answer this question