I need help with meshes and cframe?
Asked by
8 years ago Edited 8 years ago
I am trying to make it so the second mesh is overlaping the mesh inside the middle mesh
01 | p = Instance.new( 'Part' , game.Workspace.Terrain) |
04 | p.CFrame = CFrame.new( 0 , 5 , 0 ) |
05 | p.BrickColor = BrickColor.new( "Really black" ) |
06 | p.Material = Enum.Material.SmoothPlastic |
07 | p.Size = Vector 3. new( 1.8 , 1.8 , 1.8 ) |
10 | p 2 = Instance.new( 'Part' , game.Workspace) |
11 | p 2. Anchored = true p 2. Locked = true |
12 | p 2. BrickColor = BrickColor.new( "Really black" ) |
13 | p 2. Material = Enum.Material.SmoothPlastic |
14 | p 2. Size = Vector 3. new( 1.9 , 1.9 , 1.9 ) |
15 | p 2. Transparency = 0.700 |
17 | s = Instance.new( 'SpecialMesh' , p) |
19 | s.Scale = Vector 3. new( 0.1 , 0.1 , 0.1 ) |
20 | s 2 = Instance.new( 'SpecialMesh' , p 2 ) |
22 | s 2. Scale = Vector 3. new( 0.11 , 0.11 , 0.11 ) |
23 | game:GetService( 'RunService' ).Stepped:connect( function () |
24 | p.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame*CFrame.new( 0 , 0 ,- 5 ) |
There is one mesh which is 0.7 transparent which is the outline of the middle mesh, but I cant get them to stay together..
It is a nonlocal script, not a local script..
I am trying to make it like a outlined block, I dont like using selectionboxes..
Try running the code, you'll see what I mean.