I'm trying to make players spawn as a custom player model during a match in my game but I can't solve the current problem that occurs with my script; whenever someone respawns as a custom player model, it sets off the function again continously. Are there any fixes to my function or other ways to achieve my goal?
My script:
Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local oldCharacter = player.Character local newCharacter = game.WorkSpace.PreloadedAssets.NewCharacter:Clone() newCharacter.HumanoidRootPart.Anchored = false newCharacter:SetPrimaryPartCFrame(oldCharacter.PrimaryPart.CFrame) player.Character = newCharacter newCharacter.Parent = game.Workspace end) end)