Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my fireball bugging out using tween service?

Asked by 2 years ago
Edited 2 years ago

So, I've used tween service to move my fireball, it is completely fine in Studio but, playing on a Roblox server seems to cause the ball to bug out ( going up and down repeatedly ). I've used body Velocity in the past several times and every time once the is going forwards it tends to stop for a time, then keeps going. SO I stopped using it cause it wasn't smooth. I assumed that the tween was trying to apply gravity or something and even if it is, I don't know how to fix that.

Also, the fireball is unanchored so that it can collide with surroundings.

If there isn't a solution , is there anything better to use for abilities OTHER than tweening.

https://streamable.com/6klwsf

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

The fireball bugs as it is unanchored as you mentioned where physics is trying to fight with the tween itself. The most ideal method for making a projectile move is using a BodyVelocity and setting the network ownership to nil using SetNetworkOwner. Roblox uses network ownership to either stimulate an unanchored object on the server or the client and using SetNetworkOwner prevents Roblox from doing that automatic behavior. You can read more about it in the following link https://developer.roblox.com/en-us/articles/Network-Ownership

Fireball.BodyVelocity.Velocity = ??? --> This question mark is up to the speed of your projectile trajectory!
Fireball:SetNetworkOwner(nil) --> This sets the fireball's network ownership to the server, which stops the delay behavior.
0
So, I remade the fireball this time using BodyVelocity. Everything it mostly okay but when i try to anchor the ball when hitting something it just simply wont anchor but will still take away damage. I have the anchor and take damage in the same if statement , as i said it takes damage but doesnt anchor ChrisDaBeast09 0 — 2y
Ad

Answer this question