So this is a local script inside StarterPlayer scripts. There are 2 blocks in workspace called HOVER_WORK and HOVER_WORK1. It runs perfectly in Roblox Studios, but however when trying to do it in game it rather dosent do it or it does a long time after you hovered your mouse over it. The script works, its just frustratingly slow. I guess if someone can make this work without out the whole "Look around" thing that would be nice to. any help?
game.Workspace.HOVER_WORK1.ClickDetector.MouseHoverEnter:Connect(function() local lookaround = 1 lookaround = math.rad(lookaround) local player = game.Players.LocalPlayer local cam = workspace.CurrentCamera local mouse = player:GetMouse() local subject = workspace.CamPos1 local measure = Instance.new("ScreenGui",player.PlayerGui) local screensizex = measure.AbsoluteSize.X local screensizey = measure.AbsoluteSize.Y measure:Destroy() wait() print("Done") cam.CameraType = Enum.CameraType.Scriptable while true and wait() and player.Character.Humanoid.Health ~= 0 and subject do cam.CoordinateFrame = subject.CFrame * CFrame.Angles(lookaround*(((screensizey/2)-mouse.Y)/screensizey)*2,lookaround*(((screensizex/2)-mouse.X)/screensizex)*2,0) end cam.CameraType = Enum.CameraType.Custom end) game.Workspace.HOVER_WORK.ClickDetector.MouseHoverEnter:Connect(function() local lookaround = 1 lookaround = math.rad(lookaround) local player = game.Players.LocalPlayer local cam = workspace.CurrentCamera local mouse = player:GetMouse() local subject = workspace.CamPos local measure = Instance.new("ScreenGui",player.PlayerGui) local screensizex = measure.AbsoluteSize.X local screensizey = measure.AbsoluteSize.Y measure:Destroy() wait() print("Done") cam.CameraType = Enum.CameraType.Scriptable while true and wait() and player.Character.Humanoid.Health ~= 0 and subject do cam.CoordinateFrame = subject.CFrame * CFrame.Angles(lookaround*(((screensizey/2)-mouse.Y)/screensizey)*2,lookaround*(((screensizex/2)-mouse.X)/screensizex)*2,0) end cam.CameraType = Enum.CameraType.Custom end)