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

Not reflecting moves but freezing them?

Asked by 10 years ago

Heyo, you might have read my last 2 questions concerning what I am doing which is creating a move that reflects other moves. So here is the "reflector script"~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~

`function MirrorWater(hit) if BodyVelocity > 0 then BodyVelociy.velocity = -BodyVelocity.velocity

end

end script.Parent.Touched:connect(MirrorWater)`

But when one of my other moves hit it, it only freezes it. Is it because it can't detect the mesh? He is one of the moves.> `bin = script.Parent me = script.Parent.Parent.Parent name = "Lightning God's Charged Particle Cannon" Colour = BrickColor.new("New Yeller") enabled = true cost = 80 Backpack = bin.Parent Player1 = Backpack.Parent Player = Player1.Character LeftShoulder = Player.Torso["Left Shoulder"] RightShoulder = Player.Torso["Right Shoulder"] Run = game:GetService("RunService") na = bin.Name Axe = script.Parent.Parent.Parent.PlayerGui:findFirstChild("Energy") mag = Axe.Magic magmax = Axe.MagicMax

LeftShoulderC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) LeftShoulderC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) RightShoulderC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) RightShoulderC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)

function RefreshWelds() RightShoulder.C0 = RightShoulderC0 RightShoulder.C1 = RightShoulderC1 LeftShoulder.C0 = LeftShoulderC0 LeftShoulder.C1 = LeftShoulderC1

end

function onButton1Down(mouse) if not enabled then return end

    local player = game.Players.LocalPlayer
    if player == nil then return end
    enabled = false






    if mag.Value > cost then
    if me.Backpack:findFirstChild("Cast") == nil then   
                for i = 1, 10 do
            RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0.15)
            RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, .1,0)
            LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, -.15)
            LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, -.1,0)
            Run.Stepped:wait(0.01)
                end
                    ca = Instance.new("BoolValue",me.Backpack)
    ca.Name = "Cast"
    game.Debris:AddItem(ca,1)
    game:GetService("Chat"):Chat(me.Character.Head, name)
    mag.Value = mag.Value - cost
    MagicSym = Instance.new("Part")
    MagicSym.Parent = me.Character
    MagicSym.Anchored = true
    MagicSym.Parent = Workspace
    MagicSym.CanCollide = false
    MagicSym.formFactor = "Symmetric"
    MagicSym.BrickColor = BrickColor.new(21)
    MagicSym.Transparency = 1
    MagicSym.Name = "MagicSym"
    MagicSym.Size = Vector3.new(12,12,.5)
    MagicSym.TopSurface = "Smooth"
    MagicSym.BottomSurface = "Smooth"
    MagicSym.CFrame = me.Character.Torso.CFrame*CFrame.new(0,0 , -2)
    d = Instance.new("Decal")
    d.Name = "Circle"
    d.Parent = MagicSym
    d.Face = "Front"
    d.Texture = "http://www.roblox.com/asset/?id=147869642"
    p = Instance.new("Decal")
    p.Name = "Circle"
    p.Parent = MagicSym
    p.Face = "Back"
    p.Texture = d.Texture

    wait(.1)

game.Debris:AddItem(MagicSym,1)

    x = Instance.new("Part")
    x.BrickColor = Colour
    x.Size = Vector3.new(10,10,40)
    x.TopSurface = "Smooth"
    x.BottomSurface = "Smooth"
    x.Shape = "Block"
    x.Name = "DS"
    x.CanCollide = false
    x.Anchored = false
    p = script.PointLight:clone()
    p.Parent = x
    fd = script.Firedamage:clone()
    fd.Parent = x
    o = Instance.new("StringValue",x)
    o.Value = me.Name
    o.Name = "Owner"
    z = Instance.new("SpecialMesh",x)
    z.MeshType = "Sphere"
    z.Scale  = Vector3.new(0,0,0)
    y = Instance.new("BodyVelocity")
    y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
    y.velocity = me.Character.Torso.CFrame.lookVector* 330
    x.Parent = Workspace
    y.Parent = x
    x.CFrame = me.Character.Torso.CFrame*CFrame.new(0,0,-3) * CFrame.Angles(0,0,0)
    fd.Disabled = false
    x.Transparency = .2


    x2 = x:clone()
    x2.BrickColor = BrickColor.new("Really black")
    x2.Size = x.Size * Vector3.new(1.25,1.25,1.25)
    x2.CanCollide = false
    x2.Position = x.Position
    x2.Parent = Workspace
    z2 = x2["Mesh"]
    x2["Firedamage"]:remove()
    fd2 = script.Firedamage2:clone()
    fd2.Parent = x2
    fd2.Disabled = false
    x2.Transparency = x.Transparency * 3
    w1 = Instance.new("Weld", x)
    w1.Part0 = x2
    w1.Part1 = x
    w1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) *CFrame.new(0 ,0, 0)

game.Debris:AddItem(x,3) game.Debris:AddItem(x2,3) for i = 1,5 do z.Scale = z.Scale + Vector3.new(.2,.2,.2) x.Transparency = x.Transparency - .02 z2.Scale = z2.Scale + Vector3.new(.2,.2,.2) x2.Transparency = x2.Transparency - .02 wait(.005) end

    skil = me.Data.Skill
    me.Data.Skill.Value = me.Data.Skill.Value + .5
    RefreshWelds()
    wait(11)

    end
    if me.Backpack:findFirstChild("Cast") ~= nil then
        bin.Name = "Wait"
        wait(.2)
        bin.Name = na
    end 
    end


    if mag.Value <= cost then
    game:GetService("Chat"):Chat(me.Character.Head, "Not Enough Magic")
    end

enabled = true end

enabled = true function onS(mouse) mouse.Button1Down:connect(function() onButton1Down(mouse) end) end bin.Selected:connect(onS)`>

Answer this question