How would I make the catapult fling people instead of sticking to the Bowl?

Hello everyone!

I was recently making a catapult for fun :D!

what I done I made a part and then I welded it to the arm and it would tween the orientation!

but I tried getting in it worked when clicking the switch but it didn’t fling me I just stayed inside of the little bowl!

How would I make it so the player/object flys out of the Bowl?

local TweenService = game:GetService("TweenService")
local Lever = workspace.Lever.handle.thing
local DownPosLever = workspace.Lever.handle.DownPos
local UpPosLever = workspace.Lever.handle.UpPos
local ClickDetector = Lever:WaitForChild("ClickDetector")

local Sound = game:GetService("ReplicatedStorage"):WaitForChild("Trigger")
local CurrentLeverType = "Up"
local ThingyPart = workspace.Catapult:WaitForChild("HPart")

local tweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)

local function tween(obj, goal)
    TweenService:Create(obj, tweenInfo, goal):Play()
end

ClickDetector.MouseClick:Connect(function()
    local leverPos = (CurrentLeverType == "Up") and DownPosLever.Position or UpPosLever.Position
    local thingyOrientation = (CurrentLeverType == "Up") and Vector3.new(0, -90, 75) or Vector3.new(0, -90, 0)

    tween(Lever, {Position = leverPos})
    tween(ThingyPart, {Orientation = thingyOrientation})

    Sound:Play()
    CurrentLeverType = (CurrentLeverType == "Up") and "Down" or "Up"
end)
1 Like

try change your humanoid state to Ragdoll

how would i make it better for flinging stuff tho so its stronger and can hold higher weight?

Delete the weld when the tween has played.
The issue I think you’ll have is that tweening is done with anchored objects that don’t follow the Roblox physics. You may get a bit of lag this way.
Humanoid physics are weird, I believe that’s because you see your movements on the client before they get sent to the server, so timing things like this can depend on the ping from the client to the server back to the client.

If that happens then maybe try a HingeConstraint set to Servo instead to drive the catapult movement. I did make a catapult system that used a Seat to place the player, then made the Seat Weld between the player and the seat inactive, but it still had some timing issues with releasing the player.

this all the main stuff what do i need to change?
image

Are you planning on using the Tween, or the HingeConstaint, or a seat, or a weld you created?

I’m guessing the WeldConstraint in the bowl is what’s welding it to the player? If so then just delete it or disconnect it from the player’s Attachment when the catapult finishes it’s swing so the next time you can just connect it to the next person sitting in the catapult.

well i didnt put anything to attach the player like a seat but i also want it to like fling objects better due to it being very limited.

but i tried a seat and i dont go very far :frowning:

I’m guessing the WeldConstraint in the bowl is what’s welding it to the player?

No that welds it to the stick.

Did you write the script, or get if from somewhere else?

Where in your script are you welding the player to the catapult? Wherever that weld is then just make it inactive when the tween is completed.

1 Like

uh so like the thing is i dont have a thing to weld the player to the catapult…

Sorry I thought you meant you’d welded the player to the cup.

From the video it just looks like the catapult is way too slow to launch the player.

Speed up the tween rotation, or try making the arm longer to increase the speed of the cup.

Yeah, the main issue is you’re tweening a part that’s probably anchored or not affecting the player’s physics. Tweening doesn’t apply physical force so the player just sits there.

If you want actual flinging, use a HingeConstraint (with Motor or Servo) and apply angular velocity, or just unanchor the catapult arm and use a VectorForce or BodyVelocity on the player when the launch happens.

Also, make sure nothing is welded to the player or character at launch; otherwise it’ll stick instead of flying.