So I’ve been having this problem In my game where I spawn players on something and sometimes they dont rotate correctly so I figured out Id just have to remove their character before spawning them and that worked but the problem is that, it isnt instant and players can still move a bit just before but I dont want them able to move though
The problem is in the first if block, it works but I want it to be faster though so players cannt possibly move before I put them on the blocks, basically its that second wait of .01 seconds, I could remove it but it just wont allow the two lines of code after it to work because I think the player just hadnt had enough time to load
local character = player.Character
if character then
RemoteManager.MenuCamera:FireClient(player)
player.Character = nil
character.Parent = nil
task.wait(1)
player:LoadCharacter()
local newCharacter = player.Character
local block = self.blocks:GetChildren()[index].PrimaryPart
newCharacter:PivotTo(block.CFrame + Vector3.new(0,4,0))
task.wait(.01)
RemoteManager.BlockStart:FireClient(player)
self:DisableMechanics()
else
player:LoadCharacter()
local block = self.blocks:GetChildren()[index].PrimaryPart
player.Character:PivotTo(block.CFrame + Vector3.new(0,4,0))
RemoteManager.BlockStart:FireClient(player)
end