How to make sticky projectiles work?
What I am trying to do is make a sticky launcher, however I am having trouble with making the stick feature be consistent. Here's an example:
I shoot the sticky, and on the client the sticky is not stuck to an object, but is a little bit behind.
However on the server the sticky looks like it should and is on the object.
The way I make it stick is a simple .Touched which checks if the object has can collide on and is not a part of the character.
Here is the code if you want it.
1 | StickyClone.Touched:Connect( function (touchpart) |
2 | if touchpart.CanCollide = = true and not touchpart:IsDescendantOf(character) then |
3 | StickyClone.Anchored = true |
I don't know what i'm doing wrong, body velocities perhaps?