What do you want to achieve?
I want to make a GUI frame visible when the player hovers over a hitbox.
What is the issue?
The event simply wont work.
What solutions have you tried so far?
I’ve tried looking for similar problems but couldn’t find answers and I’ve tried putting a print in the functions which didn’t work (didn’t print).
local model = script.Parent
local box = model.HitBox
local cd = box.ClickDetector
cd.MouseHoverEnter:Connect(function(plr)
local ui = plr.PlayerGui.PickInfo.Frame
ui.Visible = true
print("Hover")
ui.Text.Text = "Pistol"
end)
cd.MouseHoverLeave:Connect(function(plr)
local ui = plr.PlayerGui.PickInfo.Frame
ui.Visible = false
print("Hover End")
ui.Text.Text = "Pistol"
end)
This is the only script that affects it, is it bc the gun is on the ground or something like that?
It doesn’t event print.
(hitbox is chosen in this sc)