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.

5 comments

0

"if m." what? you forgot the then.

0

sorry about that, but that is not the problem.

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.

0

hierarchy?

0

Line 7, is 'onKeyPress' supposed to be there? Shouldn't it be replaced with whatever is in the function's parentheses?