i have a main menu with a camera that shows a group of people for with a GUI that says "play". but for some reason its works occasionally. and most of the time it camera is set to the player with the GUI still there making it useless. the GUI works perfectly. but with that error, it's useless
my script
local Camera = game.Workspace.CurrentCamera local Player = game.Players.LocalPlayer repeat wait() until Player.Character Camera.CameraType = "Scriptable" Camera.CFrame = game.Workspace.CAM2.CFrame script.Parent.Enabled = true script.Parent.Background1.Visible = true script.Parent.Strike:Play() script.Parent.Parent.HealthGui.Enabled = false
can someone tell me whats wrong?
Try this:
local Camera = workspace.CurrentCamera Camera.CameraType = "Scriptable" Camera.CFrame = workspace.CAM2.CFrame script.Parent.Enabled = true script.Parent.Background1.Visible = true script.Parent.Strike:Play() script.Parent.Parent.HealthGui.Enabled = false
It doesn't wait for the character, it just sets it immediately to the play screen