Click Detector hover not working?

  1. What do you want to achieve?

When you hover over a ClickDetector instance, it tweens the player’s camera.

  1. What is the issue?

My code isn’t working for some reason.


local ts = game:GetService("TweenService")
local cam = workspace.CurrentCamera
local player = game.Players.LocalPlayer

script.Parent.MouseHoverEnter:Connect(function()
	
        print("Testing!")

	cam.CameraType = Enum.CameraType.Scriptable
	ts:Create(cam, TweenInfo.new(1), {CFrame = script.Parent.Cam.CFrame}):Play()
	
end)

Output:

Nothing

  1. What solutions have you tried so far?

I looked mainly everywhere where you can get ideal support.

Nevermind everyone! I have figured out the problem.