local gui = script.Parent

gui.MenuEnabled.Value = true

function changeAngle()
    local player = game:GetService("Players").LocalPlayer
    local partAngleFolder = workspace.MainMenuAngles
    local currentCamera = workspace.Camera
    local currentPart = partAngleFolder["MainMenuAngle"..math.random(1, #partAngleFolder:GetChildren())]
    
    currentCamera.CameraType = "Scriptable"
    currentCamera.CFrame = currentPart.CFrame
end

gui.MouseButton1Up:Connect(function()
    gui.MenuEnabled.Value = false
    gui.Parent.Enabled = false
    gui.Parent.Parent.Stats.Enabled = true
    gui.Parent.Parent.DinoInfo.Enabled = true
    gui.Parent.Parent.LifeStats.Enabled = true
end)

wait(0.1)

changeAngle()

while gui.MenuEnabled.Value == true do 
    changeAngle()
    wait(3)
end

for some reason it will make the guis appear and the angle will stop changing, but only for a second, then it will just deactivate the guis, put the main menu back, and then start changing angles again... been trying to find this out for 2 days and nothing i try works. during testing, i found out that the MenuEnabled value changes back to true as well, and i have no idea why.

1 comment

0

it seems like that while true do loop is looping, because nothing has un-click the gui