So I have a main Menu and with camera manipulation. So like when you click play it resets the camera to the player but sometimes its not working and sometimes it does work.
Script for playbutton:
--variables--
local Camera = game.Workspace.CurrentCamera
local Player = game.Players.LocalPlayer
--Scripts--
script.Parent.MouseButton1Click:Connect(function()
Camera.CameraType = "Custom"
if Player.Character and Player.Character:FindFirstChild("Torso")then
Player.Character.Torso.CFrame = CFrame.new("Torso")
end
end)
Output: 15:42:10.382 - Players.Wolf_oYT.PlayerGui.MainMenu.MainFrame.PlayButton.LocalScript:11: bad argument #1 (Vector3 expected, got string)

2 comments
Thank you so much!
No problem.