Ok so, im making a battlegrounds game where you turn into the characters. the thing is though, when i do it it has a weird problem where it takes a bit, it traps my camera in the void for a bit, and the camera doesnt even go along with it. No animations either. i also get some weird errors.
anyways heres the script
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local characterName = player:FindFirstChild("selectedstuff") and player.selectedstuff:FindFirstChild("Character")
if characterName then
local model = ServerStorage:FindFirstChild(characterName.Value)
if model then
local newChar = model:Clone()
newChar.Parent = workspace
newChar:SetPrimaryPartCFrame(char.PrimaryPart.CFrame)
player.Character = newChar
end
end
end)
end)```