I have a molotov cocktail I’m scripting, and when I throw it, I have it destroy itself upon hitting something. However, it seems to destroy itself much sooner than it actually hits something. I’ve done tests, and it seems to be functioning correctly, just as if there is a delay from replication to my client…?
- Is there a way to fix this?
- If I just make the fire appear at “hit’s” location, is it still going to work fine, just look a little strange visually?
--hit detection for bottle explosion upon impact
toolModel.Handle.Touched:Connect(function(hit)
--check if hit was part of the map (or, for testing purposes, part of the baseplate)
if hit:FindFirstAncestor("Map") or hit.Name == "Baseplate" then
--destroying bottle
toolModel:Destroy()
else
print("did not hit map")
end
end)