Hello! I am COWTACO, a fellow scripter of the roblox community and I’ve encountered an issue that I can’t really seem to solve. I’ve searched for countless other topics, but no clear solution to this was found. If you helped me, it would mean the world to me.
To start off, I wish to tween the camera in a circular motion (180 degrees) while facing my character at all times. However I have no clear idea of what I can do to accomplish that.
The closest I’ve gotten is tween the camera 90 degrees to the left, but no further than that. I’ve also tried to tween the camera to a specific block, but it doesn’t perform a circular motion, but it just rather moves the camera to it as expected. I’ve tried to use another tween using kind of the same code as well, but nothing happened.
How would I go about doing that?
I’ll be sure to leave the script I am currently using and a video for reference.
local function Rotating()
if Player.Character and Player.Character:FindFirstChild("HumanoidRootPart") then
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out)
camera.CameraType = Enum.CameraType.Scriptable
local tween = TweenService:Create(camera, tweenInfo, {CFrame = (Player.Character.HumanoidRootPart.CFrame) * CFrame.Angles(math.rad(180),math.rad(180),math.rad(180))})
tween:Play()
end
end
CameraRotator.Touched:Connect(function()
Rotating()
end)
The current script above while it does turn the camera, it doesn’t it turn it further, which is what I wish to do. My goal is to turn once more at about 90 degrees to face the humanoid the other way.
Video:
https://gyazo.com/2e28b1b4f5d5b0d29f7f6068b497a1e9
I am not really certain how I would go about doing that and I could really use some help. Thank you in advance.