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)
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.
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.
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.