So the issue is, when I place a tower, the tower just lag and move behind a little bit. I want to fix this issue. How can I fix it?
Video: Video Link
Scripts:
Module Script Function:
function towers.Spawn(player, name, defaultLevel, cframe)
local newTower = Towers:FindFirstChild(name):FindFirstChild(defaultLevel):Clone()
newTower:PivotTo(cframe)
newTower.Parent = workspace.Towers
end
placeTowerFunctions.OnServerInvoke = towers.Spawn
Local Script:
UserInputService.InputBegan:Connect(function(input, processed)
if processed then
return
end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if IS_VIEWING_TOWER_PLACEMENT then
placeTowerFunction:InvokeServer(TOWER_TO_SPAWN:GetAttribute("Tower"), DEFAULT_LEVEL,TOWER_TO_SPAWN.PrimaryPart.CFrame)
IS_VIEWING_TOWER_PLACEMENT = false
end
end
Explorer:
Thank you