You can write your topic however you want, but you need to answer these questions:
-
I am making a planet destruction physics game and i use a union system to leave crates for planets when colliding
-
I am making everything client sided since its a 1 player server and i am trying to escape from delay and lag, and if i use this script in client side it wont work
script:
local mainPart = script.Parent
local copy = script:Clone()
script.Parent.Touched:Connect(function(B)
local tee = Instance.new(“Explosion”)
tee.Parent = game.Workspace
tee.BlastRadius = 0.5
tee.TimeScale = 0.1
tee.Position = B.Position
local otherParts = {B}
if B.Transparency == 0 then
local success, newSubtract = pcall(function()
return mainPart:SubtractAsync(otherParts)
end)
-- If operation succeeds, position it at the same location and parent it to the workspace
if success and newSubtract then
copy.Parent = newSubtract
newSubtract.Position = mainPart.Position
newSubtract.Parent = workspace
newSubtract.UsePartColor = true
end
-- Destroy original parts which remain intact after operation
mainPart:Destroy()
for _, part in otherParts do
part:Destroy()
end
end
end)
- I tried using remote events(eveb tough i am trying not to use them since it causes delay) but i didnt manage and i dont know any other way
does anybody know how to make this client sided(Union parts through negate), or at least without delay or lag?