Rvzol
(Aiden)
1
I’m trying to make it so that when your mouse hovers over a GUI it expands.

I have tried looking at the Dev Hub but it backed up my code, can anyone help?
script.Parent.MouseEnter:Connect(function()
script.Parent:TweenSize(UDim2.new(0, 205, 0, 48) "Out", "Linear", 0.1, true)
script.click:Play()
print("Hi")
end)
script.Parent.MouseLeave:Connect(function()
script.Parent:TweenSize(UDim2.new(0, 205, 0, 42) "In", "Linear", 0.1, true)
end)
Kaid3n22
(Kaiden)
2
As far as I can tell, the only error here would be that there is no comma after the UDim2 in TweenSize.
script.Parent.MouseEnter:Connect(function()
script.Parent:TweenSize(UDim2.new(0, 205, 0, 48), "Out", "Linear", 0.1, true)
script.click:Play()
print("Hi")
end)
script.Parent.MouseLeave:Connect(function()
script.Parent:TweenSize(UDim2.new(0, 205, 0, 42), "In", "Linear", 0.1, true)
end)
2 Likes
Rvzol
(Aiden)
3
I don’t think you need to put a comma after Udim2.new
bleintant
(bleintant)
4
I think they’re right. You might want to try putting a comma after Udim2.new.
Inf_idel
(Infidel)
6
Bro idk what I changed but your original one didnt work, I rewrote it and it works now.
script.Parent.MouseEnter:Connect(function()
script.Parent:TweenSize(UDim2.new(0, 205, 0, 48), "Out", "Linear", 0.1, true)
script.click:Play()
print("Hi")
end)
script.Parent.MouseLeave:Connect(function()
script.Parent:TweenSize(UDim2.new(0, 205, 0, 42), "In", "Linear", 0.1, true)
end)
I know what I did differently, I added a comma after your UDim2.new(0, 205, 0, 48)
Like the people above were telling you.
So instead of
script.Parent:TweenSize(UDim2.new(0, 205, 0, 42) "In", "Linear", 0.1, true)
its
script.Parent:TweenSize(UDim2.new(0, 205, 0, 42), "In", "Linear", 0.1, true)
1 Like