Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Default Roblox Rocket Launcher Lag? [UNSOLVED]

In my game, I am using the default Roblox Rocket Launcher tool taken from the Roblox Sets. When I use it online however, the rocket does not explode EXACTLY on touch, rather it explodes a few moments after it hits any part (The rocket goes through the part, and shortly after explodes) Is this lag? Or perhaps some flaw in the script..

I need the explosion to be instantaneous because I plan to be tweaking the script so that you will be able to rocket jump and such.

Thanks in advance.

EDIT: I have now added a way to detect collision using rays, and it works a bit faster better than the Touched event, HOWEVER, when I play on Solo mode (Test) in the studio, all the rocket jumps I commit and all knockbacks are perfect, and just as I wanted them to be, but when it comes to online, there's still that slight delay that can really screw you up, is there any other way to get rid of this delay?

5 comments

1

The .Touched() event does seem to act up like this at times. I might suggest changing the script to instead cast a ray in front of the rocket on runService.Stepped() intervals, and using that to detect hits.

0

I will try that.

0

Post has been edited.

0

Try using the wait() method for the RenderStepped event in the RunService when the ray hits something. Make sure it's in a LocalScript otherwise it will not work.

0

This is working just fine in a regular Script..

1 answer

You can try use a local script in the character that will make the rocket explode on touch. Since Solo Mode is local and run on your computer and local scripts do the same; you can get the same result in online mode from solo.

3 comments

0

How can I do that?

0

You can put the local script into the gui too

0

I can't find a way to make that work.

This discussion is preserved as it was. New answers, comments, and votes are closed.