Hey everyone! So today I was practicing some camera movement, So I have a rotating camera that goes 360 degrees in a while true loop because it’s apart of the menu, when I click play, the tween happens, but after 3 seconds it’s suppose to go custom, which I thought is when the player is aloud to move the camera around and it’s back at it’s players camera. I’m not having errors at all, I’m just not sure how I can make it is at the players POV. Here is my script…
local player = game.Players.LocalPlayer
local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local character = player.Character or player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
character:WaitForChild("HumanoidRootPart").Anchored = true
local TweenService = game:GetService("TweenService")
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.Camerapart.CFrame
local info = TweenInfo.new(20,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
local rotating = true
local MainMenu = PlayerGui.MainMenu
local PlayButton = MainMenu.TextButton
local newinfo = TweenInfo.new(0.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)
PlayButton.MouseButton1Click:Connect(function()
print("PlayButton Clicked! Now the Tween will play!")
local goal = {};
goal.Position = UDim2.new(-0.2, 0, 0.71, 0)
TweenService:Create(PlayButton, newinfo, goal):Play()
wait(3)
print("Player Spawned!")
character.HumanoidRootPart.Anchored = false
character.HumanoidRootPart.CFrame = workspace.SpawnPart.CFrame
Camera.CameraType = Enum.CameraType.Custom
MainMenu:Destroy()
end)
while rotating do
local cameraTween = TweenService:Create(Camera, info, {CFrame = Camera.CFrame * CFrame.fromEulerAnglesXYZ(0, 360, 0);})
cameraTween:Play()
local blur = Instance.new("BlurEffect")
blur.Parent = workspace.CurrentCamera
blur.Enabled = true
blur.Size = 10
wait(0.02)
end
If anyone knows how to fix this, please let me know! Thanks!!!