LocalScript not working in online mode?
It works in studio but not in online mode
The LocalScript is inside the StarterGui object
and yes, I know it is messy...
01 | local Player = game.Players.LocalPlayer |
02 | local Char = Player.Character |
03 | repeat wait() until Char |
05 | Instance.new( "Model" ,Char).Name = "Body" |
06 | function Thread(f) coroutine.wrap(f)() end |
07 | function CreatePart(Name,Color,Size,Parent) local Part = Instance.new( "Part" ,Parent) Part.CanCollide = false Part.BrickColor = Color Part.Name = Name Part.TopSurface = "Smooth" Part.BottomSurface = "Smooth" Part.Material = "SmoothPlastic" Part.FormFactor = "Custom" Part.Size = Size return Part end |
09 | game:GetService( "RunService" ).RenderStepped:connect( function () |
10 | for i,v in pairs (Joints) do |
11 | v [ 2 ] .CFrame = v [ 1 ] .CFrame*v [ 3 ] |
14 | function CreateJoint(Part 1 ,Part 2 ,CF) table.insert(Joints, { Part 1 ,Part 2 ,CF } ) end |
16 | for i,v in pairs (Char:GetChildren()) do |
17 | if v:IsA( "Clothing" ) or v:IsA( "Accoutrement" ) or v:IsA( "CharacterAppearance" ) or v:IsA( "BaseScript" ) then |
19 | elseif v:IsA( "BasePart" ) then |
24 | Char.Head.face:destroy() |
25 | Char.Humanoid.CameraOffset = Vector 3. new( 0 , 2 , 0 ) |
27 | local NTS = Vector 3. new( 2.5 , 3 , 1 ) |
28 | local NewTorso = CreatePart( "Torso" ,BrickColor.White(),NTS,Char.Body) |
29 | local TMesh = Instance.new( "SpecialMesh" ,NewTorso) |
31 | TMesh.Scale = Vector 3. new( 1.5 , 1.5 , 1 ) |
32 | local T_Joint = CreateJoint(Torso,NewTorso,CFrame.new( 0 , 2 , 0 )) |
34 | local Neck = CreatePart( "Neck" ,BrickColor.Black(),Vector 3. new(. 5 ,. 5 ,. 5 ),Char.Body) |
35 | local N_Joint = CreateJoint(NewTorso,Neck,CFrame.new( 0 , 1.75 , 0 )) |
36 | Instance.new( "CylinderMesh" ,Neck) |
37 | local Head = CreatePart( "Head" ,BrickColor.White(),Vector 3. new( 1 , 1 , 1 ),Char.Body) |
38 | local H_Joint = CreateJoint(Neck,Head,CFrame.new( 0 ,. 75 , 0 )) |
39 | Instance.new( "SpecialMesh" ,Head).Scale = Vector 3. new( 1.5 , 1.5 , 1.5 ) |
40 | local face = Instance.new( "Decal" ,Head) |
43 | local RightShoulder = CreatePart( "RightShoulder" ,BrickColor.Black(),Vector 3. new( 1 , 1.1 , 1 ),Char.Body) |
44 | local RS_Joint = CreateJoint(NewTorso,RightShoulder,CFrame.new(- 1.65 ,. 9 , 0 )) |
45 | Instance.new( "SpecialMesh" ,RightShoulder).MeshType = "Sphere" |
46 | local LeftShoulder = CreatePart( "LeftShoulder" ,BrickColor.Black(),Vector 3. new( 1 , 1.1 , 1 ),Char.Body) |
47 | local LS_Joint = CreateJoint(NewTorso,LeftShoulder,CFrame.new( 1.65 ,. 9 , 0 )) |
48 | Instance.new( "SpecialMesh" ,LeftShoulder).MeshType = "Sphere" |
49 | local RightBicep = CreatePart( "RightBicep" ,BrickColor.White(),Vector 3. new(. 6 , 1.5 ,. 6 ),Char.Body) |
50 | local RB_Joint = CreateJoint(RightShoulder,RightBicep,CFrame.new( 0 ,-. 75 , 0 )) |
51 | Instance.new( "CylinderMesh" ,RightBicep) |
52 | local LeftBicep = CreatePart( "LeftBicep" ,BrickColor.White(),Vector 3. new(. 6 , 1.5 ,. 6 ),Char.Body) |
53 | local LB_Joint = CreateJoint(LeftShoulder,LeftBicep,CFrame.new( 0 ,-. 75 , 0 )) |
54 | Instance.new( "CylinderMesh" ,LeftBicep) |
55 | local RightElbow = CreatePart( "RightElbow" ,BrickColor.Black(),Vector 3. new(. 7 ,. 7 ,. 7 ),Char.Body) |
56 | local RE_Joint = CreateJoint(RightBicep,RightElbow,CFrame.new( 0 ,-. 58 , 0 )) |
57 | Instance.new( "SpecialMesh" ,RightElbow).MeshType = "Sphere" |
58 | local LeftElbow = CreatePart( "LeftElbow" ,BrickColor.Black(),Vector 3. new(. 7 ,. 7 ,. 7 ),Char.Body) |
59 | local LE_Joint = CreateJoint(LeftBicep,LeftElbow,CFrame.new( 0 ,-. 58 , 0 )) |
60 | Instance.new( "SpecialMesh" ,LeftElbow).MeshType = "Sphere" |