--// Have Hover follow the mouse
local function FollowMouse()
print("Follow")
end
print("ACTIVE")
ContextActionService:BindAction(
"FollowMouse",
FollowMouse,
false,
Enum.UserInputType.MouseMovement
)
I’m getting active to print, but not follow. Unsure what I am doing wrong here?
Your script is fine that should be printing ‘Follow’.
Is your code in a LocalScript and in a place where they can run(Workspace, StarterGui, StarterPack or StarterPlayerScripts)?
Thats odd.
Have you tried printing something after binding the action?
I tested the script myself with a LocalScript inside a ScreenGui and it worked for me.
Here’s the full functions. Prints inside the Toggle are all accurate. Still no follow print
--// Have Hover follow the mouse
local function FollowMouse()
print("FOLLOW")
end
--// Toggle the Hover
local function Toggle(active, text)
if active then
Hover.Label.Text = text
print("ACTIVE")
ContextActionService:BindAction(
"FollowMouse",
FollowMouse,
false,
Enum.UserInputType.MouseMovement
)
print("CLEAR")
HUD.Enabled = true
else
print("UNBIND")
ContextActionService:UnbindAction("FollowMouse")
HUD.Enabled = false
end
end
HoverController.Event:Connect(Toggle)
If it’s working in an empty environment and not your own environment then you likely have some script/plugin which is causing a conflict somehow, perhaps something else is manipulating the mouse.