Ad
Log in to vote
-1

Moving the ball is apparently not working?

Asked by 2 months ago
Edited 2 months ago
local CAS = game:GetService("ContextActionService")
local mound = game.Workspace:FindFirstChild("Pitcher's Mound", true)
local plr = game.Players:GetPlayerFromCharacter(mound)
local m = plr:GetMouse()
local FourSeamFB = function()
    if plr then
        if CAS:BindAction("KeyPress", onKeyPress, false, Enum.KeyCode.Four) then
            if m then
            local fourseam = Instance.new("Part")
            fourseam.Parent = game.Workspace
            fourseam.Size = Vector3.new(2,2,2)
            fourseam.Shape = 0
            fourseam.Position = plr.Character.RightHand.Position
            fourseam.CanCollide = false
            fourseam.Anchored = true
            local fourbvelo = Instance.new("BodyVelocity")
            fourbvelo.Parent = fourseam
            fourbvelo.velocity = Vector3.new(75,0,0)
            wait()
            fourseam.Anchored = false
        end
    end
end
mound.Touched:Connect(FourSeamFB)

The title explains my question.

0
"if m." what? you forgot the then. radusavin366 574 — 2mo
0
sorry about that, but that is not the problem. MCAndRobloxUnited 474 — 2mo
0
Line 12, why did you assign shape a number? It’s an enum value. and line 18, it’s Velocity not velocity. Scripting is case sensitive. incapaz 5412 — 2mo
0
hierarchy? Araknala 5 — 2mo
0
Line 7, is 'onKeyPress' supposed to be there? Shouldn't it be replaced with whatever is in the function's parentheses? Araknala 5 — 2mo

Answer this question