I know this isn't right, but its what I have so far. The results are not exactly what I am looking for.
I want it to be a floating brick in front of my camera, but here is what I get: https://gyazo.com/37997b21badfe7610026fad91e69d4a7
wait(2) local part = Instance.new("Part",game.Workspace.Camera) part.Anchored = true while true do part.CFrame = game.Workspace.Camera.CoordinateFrame + Vector3.new(0, 0, -15) wait(0.001) end
function Rotate() local plr = game.Players.LocalPlayer; local char = plr.Character local position = char.Torso Distance = 4 part.CFrame = position.CFrame*CFrame.new(0,0, Distance) -- or 0,0,4 pcall(function() part.CFrame = position.CFrame*CFrame.new(0,0,Distance) end) --This line of code is so when the part spawns, its auto CFramed to the players Torso. end game:GetService("RunService").Stepped:connect(Rotate) **THIS MUST BE A LOCALSCRIPT ** --If you wanna make it a full 360 degrees around the torso then: **MUST ALSO BE A LOCALSCRIPT** while wait() do for i = 0,360 do local plr = game.Players.LocalPlayer; local char = plr.Character local position = char.Torso Distance = 4 wait() part.CFrame = position.CFrame*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0, Distance) end end --[[No function on this one. So it wont be as smooth.--]]
wait(2) local part = Instance.new("Part",game.Workspace.Camera) part.Anchored = true part.CanCollide = false while wait() do part.CFrame = game.Workspace.Camera.CoordinateFrame * CFrame.new(5, 0, -10) end