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

How to make it not sit when hit?

Asked by 10 years ago

There are two scripts. I don't know what script makes it sit but when you are hit with the fire ball you auto sit I don't know how to fix it.

Script 1: (LOCAL SCRIPT)

local enabled = true
Player = script.Parent.Parent
--Player:WaitForDataReady()
mouse = Player:GetMouse()
run = game:GetService("RunService")
function onKeyDown(key)
if not enabled then return end
enabled = false
    Key = key:lower()
    if key == "q" then
        RightShoulder = Player.Character.Torso["Right Shoulder"]
        LeftShoulder = Player.Character.Torso["Left Shoulder"]
        Run = game:GetService("RunService")
        for i = 1, 2 do
            for i = 1, 12 do
                LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, -0.16)
                RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0.16)
                RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0.1, 0)
                LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, -0.1, 0)
                Run.Stepped:wait(0.01)
            end
            for i = 1, 12 do
                LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0.1, 0)
                RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, -0.1, 0)
                LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0.16)
                RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, -0.16)
                Run.Stepped:wait(0.005)
            end
        end
            for i = 1, 12 do
                LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, -0.16)
                RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0.16)
                RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0.1, 0)
                LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, -0.1, 0)
                Run.Stepped:wait(0.005)
            end
        game:GetService("Chat"):Chat(Player.Character.Head, "Light Ranged Attack")
        x = Instance.new("Part")
        x.BrickColor = BrickColor.new("White")
        x.Size = Vector3.new(12, 12, 12)
        x.TopSurface = "Smooth"
        x.BottomSurface = "Smooth"
        x.Shape = "Ball"
        x.Name = Player.Name
        x.CanCollide = false
        x.Transparency = 0.7
        fd = script.LRD:clone()
        fd.Parent = x
        y = Instance.new("BodyVelocity")
        y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
        y.velocity = Player.Character.Torso.CFrame.lookVector*80
        x.Parent = Workspace
        y.Parent = x
        f = Instance.new("Fire", x)
        f.Size = 15
        f.Heat = 0
        x.CFrame = Player.Character.Torso.CFrame*CFrame.new(0, 0, -12)
        fd.Disabled = false
        game.Debris:AddItem(x, 6)
        wait(0.25)
        for i = 1, 12 do
            LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0.1, 0)
            RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, -0.1, 0)
            LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0.16)
            RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, -0.16)
            Run.Stepped:wait(0.01)
        end
    end
wait(2)
enabled = true
end

mouse.KeyDown:connect(onKeyDown)

Script 2: (REG. SCRIPT)

function onDamage(Part)
    if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= "script.Parent.Name" then
        script.Disabled = true
        f = Instance.new("Fire", Part)
        for i = 1,25 do
            f.Size = f.Size +0.25
            Part.Parent.Humanoid.Health = Part.Parent.Humanoid.Health -1
            wait(0.05)
        end
        Part.Parent.Humanoid.Sit = true
        f:remove()
        script.Parent:remove()
    end
    wait(0.025)
end

script.Parent.Touched:connect(onDamage)

3 answers

Log in to vote
0
Answered by
Discern 1007 Moderation Voter
10 years ago

Just remove Line 10 from Script 2. All better! :)

0
Could I be able to change it to: Part.Parent.Humanoid.Sit = false ? EmperorF 0 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

Make line 10 in script 2 false instead of true.

0
Okay! Thanks EmperorF 0 — 10y
Log in to vote
0
Answered by 10 years ago

Line 10 should be false

Answer this question