So my script makes it so that the player looks right when player's mouse enters a gui. the only problem is, I set it so that the function only works when a value is true. It still functions. Here is the script!:
if script.Heli6Ready.Value == true then
player.PlayerGui.Ermg.Left.MouseEnter:connect(function()
if script.LookingLeft.Value == false then
script.LookingLeft.Value = true
camera.CameraSubject = target
camera.CoordinateFrame = CFrame.new(target.Position)
* CFrame.Angles(0, math.rad(181), 0)
wait(0.01)
camera.CameraSubject = target
camera.CoordinateFrame = CFrame.new(target.Position)
* CFrame.Angles(0, math.rad(182), 0)
wait(0.01)
camera.CameraSubject = target
camera.CoordinateFrame = CFrame.new(target.Position)
* CFrame.Angles(0, math.rad(183), 0)
end
end)
script.Heli6Ready.Value = false
script.Heli4Ready.Value = true
end
