I’m developing a very very very crappy mortar, but I don’t want my mortar to be that crappy, and right now the client is responding to the touched event much more different compared to the server.
You can see according to the videos
Server:
Client:
As you can see the client’s explosion is hovering over the target, and it’s very noticeable. I don’t like that.
Does anybody know what’s going on or know how to fix it?
function touched(Hit)
if Hit:IsDescendantOf(folderstoignore[1]) then
return
end
if Hit:IsDescendantOf(workspace) then
local exaudio = game.SoundService.MortarAudio["Explosion [Quick]"]:Clone()
local exgfx = game.ServerStorage.BulletExplosionParticles:GetDescendants()
local PO = clone.ParticleOrigin
for i, v in pairs(exgfx) do
local pclone = v:Clone()
pclone.Parent = PO
pclone.Enabled = true
end
exaudio.Parent = PO
exaudio:Play()
clone.Transparency = 1
clone.CanTouch = false
clone.Anchored = true
for i, v in pairs(exgfx) do
local pclone = v:Clone()
pclone.Enabled = false
wait(0.05)
end
clone:Destroy()
end
end
Actually, I’m confused about what to set the networkowner to because it still doesn’t work after extensive testing and the physics doesn’t apply at all.
Nvm it doesn’t work I recently found out after further testing.
If I have any solution I will post it here because I can’t remove the solution from my message no longer. I found the solution