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

How come this works in Play Solo, but not in an active server?

Alright, i've made this local script inside a Gui of mine, to make the buttons expand (have a little animation) once one's mouse enters the area of the button.

It works when i go to Test>PlaySolo, everything works fine. Not when i go to the game, from my profile, and play the game in an active server. Why?

Here is the LocalScript, for all 3 buttons:

Player = game.Players.LocalPlayer
Menu = script.Parent
Start = Menu.Start
Options = Menu.Options
Custom = Menu.CustomizePlayer

--Start
function MouseEnterStartButton()
	Start.Size = UDim2.new(0, 160, 0, 60)
	end
	
function MouseLeftStartButton()
	Start.Size = UDim2.new(0, 150, 0, 50)
	end
	
	
Start.MouseLeave:connect(MouseLeftStartButton)
Start.MouseEnter:connect(MouseEnterStartButton)

--CustomizePlayer
function MouseEnterCustomButton()
	Custom.Image = "http://www.roblox.com/asset/?id=146976841"
	end
	
function MouseLeftCustomButton()
	Custom.Image = "http://www.roblox.com/asset/?id=146974860"
	end
	

Custom.MouseLeave:connect(MouseLeftCustomButton)
Custom.MouseEnter:connect(MouseEnterCustomButton)


--Options
function MouseEnterOptionsButton()
	Options.Image = "http://www.roblox.com/asset/?id=146976841"
	end
	
function MouseLeftOptionsButton()
	Options.Image = "http://www.roblox.com/asset/?id=146974850"
	end
	


Options.MouseLeave:connect(MouseLeftOptionsButton)
Options.MouseEnter:connect(MouseEnterOptionsButton)

2 answers

Try placing the LocalScript inside the StarterGui. Also, where is the GUI located?

I recently had a similar problem with a tool. It turned out I just had to make the script a local script, but somebody said that adding a wait() at the start might work.

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