Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

GUI only works in studio but not roblox?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
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.

0
localscript? YellowoTide 1992 — 9y
0
Yes its a local script AthoronTheBrave 45 — 9y

1 answer

Log in to vote
0
Answered by
xAtom_ik 574 Moderation Voter
9 years ago

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)

0
Still doesnt work AthoronTheBrave 45 — 9y
0
After doing all of that still won't work AthoronTheBrave 45 — 9y
Ad

Answer this question