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

Having problems with MouseEnter and MouseLeave, they won't work?

I made a MouseOver system so that it puts the script that controls the MouseEnter and MouseLeave in specified frames I tell it to. But recently it stopped working for some reason, all I have it do is put the script inside the frame specified and Tween the position of the ImageLabel when you put your mouse over it. It worked a week ago but now it isn't. Here is the script that puts the script inside of the script inside the frames specified.

function Handle(name)
	local clone = script.Handle:Clone()
	clone.Parent = script.Parent:FindFirstChild(name)
	clone.Disabled = true
	wait(0.1)
	clone.Disabled = false
end

Handle("ClassButton")
Handle("PlayButton")
Handle("GamepassesButton")
Handle("HelpButton")

And here is the script that Tweens the ImageLabel inside the frame that the script is in.

script.Parent.MouseEnter:connect(function()
	script.Parent:FindFirstChild("Image"):TweenPosition(UDim2.new(0.1, 0, 0, 0), "Out", "Quint", 0.35, true)
	print("Mouse entered")
end)

script.Parent.MouseLeave:connect(function()
	script.Parent:FindFirstChild("Image"):TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quint", 0.35, true)
	print("Mouse left")
end)

http://prntscr.com/422e7l This link will direct you to a screenshot software website simply to show you the layout I am talking about.

The script is put inside a frame like this and it Tweens the position of the ImageLabel when you put your mouse over it using MouseEnter and MouseLeave.

1 answer

Somehow, ROBLOX managed to break Tweens, and they aren't working that good right now. I recommend you use another way (maybe a longer script) until ROBLOX fixes the error.

mranderson11

2 comments

0

Aw that's dissapointing. I think I'll just wait a while until they fix it and if not then I'll just find an alternative way to do this.

0

In addition to that, tween only works in local scripts currently.

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