Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why wont my lightsaber swing? @gingerely gave me this script and it wont swing..

local tool = script.Parent

local damage = 5
local Cooldown = 0
local Cooldowns = {}
local inner = tool.Emitter.Inner
local outer = tool.Emitter.Inner

tool:WaitForChild("Blade").Touched:Connect(function (hit)
    
    if hit.Parent:FindFirstChild("Humanoid") then
        local Humanoid = hit.Parent.Humanoid
        if not Cooldowns[Humanoid] or tick() - Cooldowns[Humanoid] > 1 then
            Cooldowns[Humanoid] = tick()
            hit.Parent.Humanoid:TakeDamage(damage)
        end
end
end)

tool:WaitForChild("RemoteEvent").OnServerEvent:Connect(function (player, state)
    if tick() - Cooldown < 3 then return end
    Cooldown = tick()
    if state then
        tool.Emitter.Inner.Enabled = true
        tool.Emitter.Outer.Enabled = true
    else
        inner.Parent = nil
        outer.Parent = nil

        inner.Enabled = false
        outer.Enabled = false

        wait(2)

        inner.Parent = tool.Emitter
        outer.Parent = tool.Emitter

    end

6 comments

0

Well your script doesn't seem to have animations or movement so I guess that is why it is not moving.

0

Alright! Thank you!

0

grrr gingerly i knew she would let you down

0

grrr

0

Loading...

0

Loading...

1 answer

Like GreenHamster1 said, your script does not have any animations. Also, could you take the time to accept the answer of that script? I took the time to type it and it does not seem like you accepted it

2 comments

0

Well I didnt get it to work. So I’m not going to accept it? That's basically saying "someone gave me a script and I don't know if it works but I’m going to accept it. Nope. I’m not going to until I get it to work.

0

So don't take my script.. Remove the lines I made and do it own your own since it doesn't work

This discussion is preserved as it was. New answers, comments, and votes are closed.