What is your way to make a throwable item?

You’d probably have better success getting an answer if you post in Scripting Support.

1 Like

I said to move the topic but he doesn’t want.

1 Like

Haha, sorry for my naive-ness lol. I really feel Mindblank today. Of course i know event, but i didn’t bother searching it on object browser because of my laziness and mindblank. I should improve

Thanks for the reminder anyway

@TheTurtleMaster_2

Hmm. Using your formula

The script do work. However, the ‘item’ i want to throw just flung out to the side. Especially if i aim on the skyboxes.

local Snowball = game.ServerStorage:FindFirstChild("Snowball"):Clone() -- Snowball sprite
		Snowball.Parent = game.Workspace
		Snowball.Position = player.Head.Position
		wait(0.5) -- Make sure the snowball no longer clipping with the player head.
		Snowball.CanCollide = true
		Snowball.BrickColor = BrickColor.new(Color)
		Snowball.Velocity = Vector3.new(MousePosition.x,MousePosition.y + Magnitude,MousePosition.z)

Is this the formula you mean?

You can clamp the Magnitude or using math.min on the Magnitude, can we see where you are setting the magnitude?

Just a casual (Mouse.hit - Character).magnitude. What’s wrong?

What is character? The player’s character’head or something like that?

Yeah. But the snowball can be clipped upon creation. Setted to Collideable 0.5 second after creation just like you can see in the script.

You can always make Magnitude smaller using

Magnitude = math.min(Magnitude,20)

Just tried it. The ball go smoothly when targeted on ground or any other part. However, of course using the mouse position to set the velocity. The ball still fly really fast, thus creating the effect “Its too fast i didn’t see it happened” when pressed on skybox. And probably go fast too if press on a far object.

I might just try to find another method.

If you don’t need this method then you should learn about Bazier Curves.

Good grief…

I actually might try. Still have hope for the BodyThrust or body else tho.

I would suggest you using body velocity.
For example

local mouse = player:GetMouse()
local Speed = 50
tool.Activated:Connect(function()
  local bodyVelo = Instance.new("BodyVelocity", tool.Handle) -- Thing you want to throw
  bodyVelo.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  bodyVelo.Velocity =  CFrame.new(tool.Handle.Position, mouse.Hit.p).LookVector * Speed
end)
4 Likes

I say look at a free model script,the default roblox knife.It seems to show how to make one
Mark as Soltuion

Preview code:

local throwingHandle = Handle:Clone()
		DebrisService:AddItem(throwingHandle, 5)
		throwingHandle.Parent = game.Workspace
		if MyCharacter and MyHumanoid then
			throwingHandle.Velocity = (MyHumanoid.TargetPoint - throwingHandle.CFrame.p).unit * 100
			-- set the orientation to the direction it is being thrown in
			throwingHandle.CFrame = CFrame.new(throwingHandle.CFrame.p, throwingHandle.CFrame.p + throwingHandle.Velocity) * CFrame.Angles(0, 0, math.rad(-90))
			local floatingForce = Instance.new('BodyForce', throwingHandle)
			floatingForce.force = Vector3.new(0, 196.2 * throwingHandle:GetMass() * 0.98, 0)
			local spin = Instance.new('BodyAngularVelocity', throwingHandle)
			spin.angularvelocity = throwingHandle.CFrame:vectorToWorldSpace(Vector3.new(0, -400, 0))
		end
1 Like

This does not solve my problem. The item fly without any gravity applied to it.

Can you do one with BodyThrust?

I’m not sure about this, when I use body thrust it just become weird and spinning around like w h a t.

Im trying to make a throwing item that affected by gravity. And you can throw it higher by aiming it at the sky or some sort.

It seems hard i guess.

I think I have got an idea out there, you know doomspire brickbattle, it has an open-source, you can go on and check how did they make the slingshot

1 Like

Where can i get the source? I want to know the trusted link for it.

https://www.roblox.com/games/1215581239/Doomspire-Brickbattle

1 Like

Oops didn’t realize that the game is editable.
Guess i just going to put solution to ‘close’ the thread. Hopefully this solve my problem

1 Like