Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What's wrong with this clickdetector system?

I'm trying to make a clickdetector system that will show info when a player hovers over the detector, but I've ran into the problem that my hover info isn't showing up or giving any output errors?

script.Parent.MouseHoverEnter:connect(function(plr)
	if not plr.PlayerGui:findFirstChild("BankGui") then
		new = script.BankHoverInfo:clone()
		new.Parent = plr.PlayerGui
		new.Frame.Position = UDim2.new(plr:GetMouse().X,0,plr:GetMouse().Y,0)
		print("plox")
	end
end)

It printed "plox" and there were no output errors but the GUI didn't show up. What's wrong?

2 answers

What is that "MouseHoverEnter" can I see your script hierarchy?

On line 5, you didn't set the coordinates correctly, because here you're trying to give your frame pixel coordinates, not scale coordinates, that's why you didn't se it : it appears way out of the screen. Changing line 5 to this should fix the problem :

new.Frame.Position = UDim2.new(0, plr:GetMouse().X,0,plr:GetMouse().Y)

This discussion is preserved as it was. New answers, comments, and votes are closed.