Hi! I’m currently working on a decently popular army game and am encountering an error with a projectile module script for an RPG.
It all works fine, until the player dies while an RPG they shot is in the air or in the process of exploding.
The issue is that RunService won’t continue running after that player has died, below you can find a code example.
local t = 1
t = distance/projectile.maxVelocity
local nt = 0;
while (nt < t*2) do
--code
nt = nt + rs:Wait(); --rs = RunService
end
There hasn’t been much that I tried yet, although there isn’t much I can try.
I am hoping for someone who is experienced with RunService and can help walk me through what went wrong. If it helps, I’ve already looked at the devforum for similar issues along with docs about RunService and didn’t find anything.
Thanks in advance!