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

Start GUI works in Studio, but not in servers?(I FIXED!)

Asked by
Vid_eo 126
9 years ago

I was making a start GUI for my game, and it worked just fine in studio, but not in servers. I tried to fix it by making the variables local and not local, but it still didn't work. Here is the script:

local Player = game.Players.LocalPlayer
Box = script.Parent.Parent.Frame
Play = script.Parent.Parent.Play
gui = script.Parent.Parent
Text = script.Parent.Parent.TextLabel1
local Sound = Instance.new("Sound", gui)
Sound.SoundId = "http://www.roblox.com/asset/?id=221235033"
Sound.Pitch = 1
Sound.Volume = 0.7

Sound:Play()


function MouseEnterPlayButton()
    Play.FontSize = "Size48"
end

Play.MouseEnter:connect(MouseEnterPlayButton)

function MouseLeftPlayButton()
    Play.FontSize = "Size36"
end

Play.MouseLeave:connect(MouseLeftPlayButton)

function PlayGame()
    Box:Destroy()
    Play:Destroy()
    Sound:Stop()
    Text:Destroy()
end

Play.MouseButton1Down:connect(PlayGame)

Thanks! -club101coolguy

0
Next time, press F9 in game to see output. Nickoakz 231 — 9y

Answer this question