Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can't get the part to rotate right?

Asked by 8 years ago

So, The part won't get from out of the other part. Why? And how do I fix this?

s = Instance.new("Part")
s.Anchored = true
s.BrickColor = BrickColor.new("Toothpaste")
s.Transparency = 0.5
s.Size = Vector3.new(2, 2, 2)
s.CanCollide = false
z = Instance.new("PointLight", game.Workspace)
z.Brightness = 100
z.Color = Color3.new(0, 0, 255)
z.Range = 12
z.Name = "Sp1"
game.Workspace.Sp1.Parent = s
s.Parent = game.Workspace

s2 = Instance.new("Part")
s2.Anchored = true
s2.BrickColor = BrickColor.new("Toothpaste")
s2.Transparency = 0.5
s2.Size = Vector3.new(2, 2, 2)
s2.CanCollide = false
z = Instance.new("PointLight", game.Workspace)
z.Brightness = 100
z.Color = Color3.new(0, 0, 255)
z.Range = 12
z.Name = "Sp2"
game.Workspace.Sp2.Parent = s2
s2.Parent = game.Workspace

s3 = Instance.new("Part")
s3.Anchored = true
s3.BrickColor = BrickColor.new("Toothpaste")
s3.Transparency = 0.5
s3.Size = Vector3.new(2, 2, 2)
s3.CanCollide = false
z = Instance.new("PointLight", game.Workspace)
z.Brightness = 100
z.Color = Color3.new(0, 0, 255)
z.Range = 12
z.Name = "Sp3"
game.Workspace.Sp3.Parent = s3
s3.Parent = game.Workspace

s4 = Instance.new("Part")
s4.Anchored = true
s4.BrickColor = BrickColor.new("Toothpaste")
s4.Transparency = 0.5
s4.Size = Vector3.new(2, 2, 2)
s4.CanCollide = false
z = Instance.new("PointLight", game.Workspace)
z.Brightness = 100
z.Color = Color3.new(0, 0, 255)
z.Range = 12
z.Name = "Sp4"
game.Workspace.Sp4.Parent = s4
s4.Parent = game.Workspace

    r = game.Workspace.XactIy.Torso
    while wait() do
        for i=1,460 do -- 360
            s.CFrame = CFrame.new(r.CFrame.X+math.sin(math.rad(i))*6,r.CFrame.Y,r.CFrame.Z+math.cos(math.rad(i))*6) 
            s2.CFrame = CFrame.new(r.CFrame.X-math.sin(math.rad(i))*6,r.CFrame.Y,r.CFrame.Z-math.cos(math.rad(i))*6)
            s3.CFrame = CFrame.new(r.CFrame.X-math.sin(math.rad(i))*6,r.CFrame.Y,r.CFrame.Z-math.cos(math.rad(i))*6)
            s4.CFrame = CFrame.new(r.CFrame.X-math.sin(math.rad(i))*6,r.CFrame.Y,r.CFrame.Z-math.cos(math.rad(i))*6)
            wait()
        end
    end
0
use CFrame.new. HungryJaffer 1246 — 8y
0
I'm not too good on CFraming.. Could you put it into a script? x) BurstingPheonix 0 — 8y

Answer this question