Annoying problem with my projectile

may you provide the game files of the game so i can test and edit myself?

1 Like

Hm, seems like I didnt look at that bit of the code

1 Like

Here is the game open source, let me know if you get any solution, I really don’t know what the reason of this problem, I have no clue

teste.rbxl (102,8,KB)

1 Like

1st off, I wouldn’t open source it yet, but also, I think we should team test

EDIT: I think it was just my way of handling the delay, it might? work now. I wont say that for sure until other people verified it.

EDIT x2: It broke on me again

2 Likes

I’m 100% convinced its roblox physics engine causing the issue, regarding it can’t keep up, you simply need to extend the wait time.

Yeah, I do agree with you, as said, it worked at a 3 second delay, but not lower

Guys I fixed the problem! All this was a logic problem.

In my server script, the local Connection was out of my OnServerEvent function. In this case, connection variable is overwritten each time a new projectile is launched. This means that when you try to disconnect the Heartbeat connection for a specific projectile, you might actually be disconnecting the connection of the last launched projectile.

So all I had to do, I moved the local Connection inside the OnServerEvent function, it creates a new Connection variable for each projectile, allowing each one to be controlled independently!

Thank y’all for helping so far, I really appreciate it!

3 Likes

good job, one of my programmer friends joined me while playing the game lol

2 Likes

:sob: that was it how did i not see that, well it was fun while it lasted, apologise i wasn’t much help.

edit: i wish you the best on your journey as a dev, till we meet again!

3 Likes

It happens even to the best devs, we both share the same reason on this project.

2 Likes

I appreciate every attempt to help, so we could learn together and the lesson remains: whenever you create a variable for the Heartbeat, create it inside the OnServerEvent function!

1 Like


I rebooted the servers when you said you fixed it.

1 Like

@Herades Is this still an issue, or did you not save it to roblox?

1 Like

Not at all, I fixed it 100%, you can spam it with no problem!

2 Likes

Must’ve been the fact you didn’t save it to roblox lol

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.