I’m making a main menu when the player joins, their camera is set to a position until they clicked a button, then their camera will be set back to the player. I did not disable CharacterAutoLoads, but I try to disable the character inputs while they are playing. This is in starterplayerscripts so it should only run once. Problem is, the camera isnt tweening and the controls arent getting disabled. I have looked on youtube, but to no avail.
local camera = game.Workspace.CurrentCamera
local Tweenpart = game.Workspace.TweenPart
local TS = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local PlayerScripts = player:WaitForChild("PlayerScripts")
local ControlModule = require(PlayerScripts:WaitForChild("PlayerModule"):WaitForChild("ControlModule"))
local tweeninginfo = TweenInfo.new(6,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0)
Properties = {CFrame = Tweenpart.CFrame}
game.Players.PlayerAdded:Connect(function()
camera.CameraType = Enum.CameraType.Scriptable
local Tween = TS:Create(camera,tweeninginfo,Properties)
ControlModule:Disable()
Tween:Play()
end)
game.StarterGui.UI.MainFrame.PlayButton.MouseButton1Click:Connect(function()
ControlModule:Enable()
camera.CameraType = Enum.CameraType.Custom
camera.CameraSubject = player.Character:WaitForChild("Humanoid")
end)