Why am I getting this strange error? (Updated script)
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.
01 | local player = game:GetService( 'Players' ).LocalPlayer |
02 | local newCharacter = game.ReplicatedStorage.newPlayer:Clone() |
03 | local SpawnLocation = game.Workspace.SpawnLocation |
07 | player.CharacterAdded:connect( function () |
11 | newCharacter.Parent = game.Workspace |
12 | newCharacter.Name = player.Name |
13 | player.Character = newCharacter |
14 | player.CanLoadCharacterAppearance = nil |
15 | newCharacter.Archivable = false |
And here is the second script.
1 | local Player = game.Players.LocalPlayer |
3 | Player.Character.Humanoid.Running:connect( function (speed) |
5 | print ( "Player is running" ) |
7 | print ( "Player has stopped" ) |