Skip to content

Commit

Permalink
Fix not working when respawn
Browse files Browse the repository at this point in the history
  • Loading branch information
bqmb3 committed Jul 20, 2024
1 parent 921a1bd commit 5869e17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function F3X.new(init)
end

function EnsureInitialized(self)
if self._endpoint and self._endpoint.Parent.Parent then return end
if self._endpoint and self._endpoint:FindFirstAncestorOfClass("Player") then return end
local init = _G.F3X__init_func or function()
game.Players:Chat(':f3x')
return plr.Backpack:WaitForChild('Building Tools', 1)
Expand Down Expand Up @@ -195,7 +195,7 @@ end
-- @treturn nil
function F3X:ResizeParts(Changes)
EnsureInitialized(self)
return self._endpoint:InvokeServer("Resize", Changes)
return self._endpoint:InvokeServer("SyncResize", Changes)
end

--- Resizes a single part.
Expand Down Expand Up @@ -432,7 +432,7 @@ end
-- @treturn nil
function F3X:SetAnchors(Changes)
EnsureInitialized(self)
return self._endpoint:InvokeServer("SetAnchor", Changes)
return self._endpoint:InvokeServer("SyncAnchor", Changes)
end

--- Anchors a single part.
Expand Down

0 comments on commit 5869e17

Please sign in to comment.