Ok listen Carefully!
Step 1: Put 2 Bricks
Step 2: 2D, Place this script one of your bricks
03 | function GetMass(object) |
05 | if pcall ( function () return object:GetMass() end ) then |
06 | mass = object:GetMass() |
08 | for _,child in pairs (object:GetChildren()) do |
09 | mass = mass + GetMass(child) |
16 | local human = part.Parent:findFirstChild( "Humanoid" ) |
17 | if (human = = nil ) then return end |
18 | if ting = = 0 and human.Parent:findFirstChild( "LocalScript" ) = = nil then |
20 | script.Parent.Reflectance = 0.1 |
22 | local d = script.LocalScript:clone() |
23 | d.Parent = human.Parent |
26 | local torso = human.Parent.Torso |
27 | local bp = Instance.new( "BodyPosition" ) |
29 | bp.position = torso.Position |
32 | bp.maxForce = Vector 3. new( 0 , 0 , 1000000 ) |
34 | local bf = Instance.new( "BodyForce" ) |
35 | bf.force = Vector 3. new( 0 , 100 *GetMass(human.Parent), 0 ) |
37 | human.Parent.Humanoid.WalkSpeed = 24 |
38 | human.Parent.DescendantAdded:connect( function () |
39 | bf.force = Vector 3. new( 0 , 100 *GetMass(human.Parent), 0 ) |
41 | human.Parent.DescendantRemoving:connect( function () |
42 | bf.force = Vector 3. new( 0 , 100 *GetMass(human.Parent), 0 ) |
48 | script.Parent.Reflectance = 0 |
51 | script.Parent.Touched:connect(onTouch) |
in the SAME brick, create a new localscript (advanced Objects -> localscript) and copy this to local script
05 | local torso = script.Parent.Torso |
06 | local center = Instance.new( "Part" ) |
07 | center.Name = script.Parent.Name .. " Center" |
08 | center.Transparency = 1 |
09 | center.CanCollide = false |
10 | center.Size = Vector 3. new( 1 , 1 , 1 ) |
11 | center.CFrame = CFrame.new(Vector 3. new( 0 , 0 , 0 ),Vector 3. new( 0 , 0 ,- 1 )) |
12 | center.Position = torso.Position |
13 | center.Parent = game.Workspace |
14 | local bp = Instance.new( "BodyPosition" ) |
15 | bp.position = center.Position |
16 | bp.maxForce = Vector 3. new( 1000000 , 1000000 , 1000000 ) |
18 | local bg = Instance.new( "BodyGyro" ) |
19 | bg.maxTorque = Vector 3. new( 9 e+ 005 , 9 e+ 005 , 9 e+ 005 ) |
20 | bg.cframe = center.CFrame |
22 | local cam = game.Workspace.CurrentCamera |
23 | cam.CameraSubject = center |
24 | cam.CameraType = Enum.CameraType.Attach |
29 | center.BodyPosition.position = torso.Position |
31 | cam.CoordinateFrame = CFrame.new(Vector 3. new(center.Position.x + distance,center.Position.y + height,center.Position.z)) |
33 | if torso.Parent.Humanoid.Health < 1 then |
35 | torso.BodyForce:remove() |
Step 3: changing 3D
Ok now go to your second brick, create a script and copy this
04 | local human = part.Parent:findFirstChild( "Humanoid" ) |
05 | if (human = = nil ) then return end |
06 | if ting = = 0 and human.Parent.LocalScript ~ = nil then |
08 | script.Parent.Reflectance = 0.1 |
09 | local charitem = human.Parent:GetChildren() |
10 | for i = 1 , #charitem do |
11 | if charitem [ i ] .Name = = "LocalScript" then |
15 | local torsoitem = human.Parent.Torso:GetChildren() |
16 | for i = 1 , #torsoitem do |
17 | if torsoitem [ i ] .Name = = "TwoD" or torsoitem [ i ] .Name = = "BodyForce" then |
21 | game.Workspace.CurrentCamera:remove() |
22 | local cam = script.Instance:clone() |
23 | cam.CameraSubject = human |
24 | cam.Parent = game.Workspace |
25 | game.Workspace.CurrentCamera = cam |
28 | script.Parent.Reflectance = 0 |
31 | script.Parent.Touched:connect(onTouch) |
Now at advanced objects, create a camera and rename to Instance, put the camera to 3D Script
Step 4: Test it, Got problems? reply
Closed as Not Constructive by Articulating and evaera
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?