This script is supposed to allow the player to control a custom character. However, whenever it runs I get this : 00:00:38.987 - startScript re-entrancy has exceeded 3 00:00:38.987 - Script 'Players.Player1.Backpack.CharMorph', Line 8
Also, whenever this script is active, it stops a second script from running.
Here is the script.
local player = game:GetService('Players').LocalPlayer local newCharacter = game.ReplicatedStorage.newPlayer:Clone() local SpawnLocation = game.Workspace.SpawnLocation local debounce = false player.CharacterAdded:connect(function() if not debounce then debounce = true newCharacter.Parent = game.Workspace newCharacter.Name = player.Name player.Character = newCharacter player.CanLoadCharacterAppearance = nil newCharacter.Archivable = false wait(1) debounce = false end end)
And here is the second script.
local Player = game.Players.LocalPlayer Player.Character.Humanoid.Running:connect(function(speed) if speed > 0 then --Straight from the Wiki! print("Player is running") elseif speed < 1 then print("Player has stopped") end end)
From your error, I can assume that you are binding CharacterAdded event to your function which adds a character. What i suggest is adding a debounce.
local debounce = false player.CharacterAdded:connect(function() if not debounce then debounce = true -- code for adding a new character debounce = false end end)
Hope this helped.