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

The output doesn't say any errors, please help?

Asked by 9 years ago

So, I want the ball to be thrown where the person is looking. Here is the code: Note: It does nothing when being thrown.

Mouse = game.Players.LocalPlayer:GetMouse()
Player = game.Players.LocalPlayer
Character = Player.Character
Torso = Character.Torso
Part = game.Workspace.Part
Part.Anchored = true


Mouse.KeyDown:connect(function(key)
    key = key:lower()
    if key == "f" then
        for i = 1, 10 do
            wait(0.000000001)
                Part.Size = Part.Size + Vector3.new(1,1,1)
            Part.Position = Part.Position + Vector3.new(0,2,0)      



        end
while true do
    wait(0.00001)
    Part.CFrame = Part.CFrame * CFrame.fromEulerAnglesXYZ(0.5,0.5,0.5)

end

end
end)
Mouse.KeyDown:connect(function(key)
    key = key:lower()
    if key == "g" then
        for i = 1,10 do
                wait(0.000000001)
                Part.Size = Part.Size - Vector3.new(1,1,1)
                Part.Position = Part.Position - Vector3.new(0,1,0)

        end
    end

end)


Mouse.KeyDown:connect(function(key)
    key = key:lower()
    if key == "e" then
        local fire = Instance.new("Fire",Part)
            fire.Size = 50
            fire.Heat = 50



end
end)

Mouse.KeyDown:connect(function(key)
    key = key:lower()
    if key == "t" then
        local Bv = Instance.new("BodyVelocity")
        Bv.Parent = Part
        Bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
        Bv.velocity = Character.Torso.CFrame.lookVector * 100
    end
end)

1
I suppose key value's isn't equal to "t", "e", "g" or "f". Set a new variable, ex: keyLower = key:lower() FieryEvent 185 — 9y
0
variables aren tyler46783 0 — 9y
1
Set breakpoints and use the debugger DewnOracle 115 — 9y
2
Script works fine, make sure that the brick is unanchored... M39a9am3R 3210 — 9y
View all comments (2 more)
0
^Above^ Delete line six DewnOracle 115 — 9y
1
Oh,.... I thought I made sure the brick was unanchored before running the test -_- *facepalm* M39a9am3R 3210 — 9y

Answer this question