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

GUI only works in studio but not roblox?

local start = script.Parent.Play
local fade = false
 local menu = script.Parent

function MouseOverStart()
	start.FontSize = "Size24"
	start.UDim2.new(0.25, 0.2, 0.25, 0.5)  
end
function MouseLeavesStart()
	start.FontSize = "Size24"
	
end

 
 function Playgame()
	if fade == false then
		menu:remove()
	end
end
start.MouseLeave:connect(MouseLeavesStart)
start.MouseEnter:connect(MouseOverStart)
start.MouseButton1Down:connect(Playgame)


So, this is code for some gui, when I test it it runs fine. But when I use regular servers outside of studio it doesn't work do I have to use local players while using it or something.

2 comments

0

localscript?

0

Yes its a local script

1 answer

EDITED


AthoronTheBrave, I believe it is the MouseOverStart and MouseLeavesStart functions that don't work, Hopefully that's right.

Hopefully this will work

Here is my fixed version

local start = script.Parent.Play
local fade = false
local menu = script.Parent

function MouseOverStart()
    start.FontSize = "Size24"
    start.Size = UDim2.new(0.25, 0.2, 0.25, 0.5)  
end
function MouseLeavesStart()
    start.FontSize = "Size18" -- Edited the size
    start.Size = UDim2.new(0.2, 0.15, 0.2, 0.45) -- Change these to the original measurements
end


 function Playgame()
    if fade == false then
        menu:remove()
    end
end
start.MouseLeave:connect(MouseLeavesStart)
start.MouseEnter:connect(MouseOverStart)
start.MouseButton1Down:connect(Playgame)

2 comments

0

Still doesnt work

0

After doing all of that still won't work

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