It's been a while since I've scripted using GUI's and I seem to be having a problem. I'm trying to make a new Menu gui for my game and I can't seem to get the ServerScript to work w/ any of the buttons. The way the Menu works is, each section is it's own Frame, so I have multiple frames in one gui, and I want to use one script per frame for all the different buttons. Here's the first script for loading and starting a new game:
frame = script.Parent gui = frame.Parent pgui = gui.Parent player = pgui.Parent New = frame.New Load = frame.Load Data = player.Data enabled = true function NewGame() if enabled == true then enabled = false for i,v in pairs(Data:GetChildren()) do if v:IsA("StringValue") then v.Value = "Blank" elseif v:ISA("NumberValue") then v.Value = 0 end end gui.Menu.Visible = false wait(0.5) gui.Chakras.Visible = true end wait(0.2) enabled = true end function LoadGame() if enabled == true then enabled = false wait(0.2) enabled = true end end New.MouseButton1Click:connect(NewGame) Load.MouseButton1Click:connect(LoadGame)
I've tried switching to LocalScript and it works just fine, however I want to avoid using LocalScripts if possible, any advice?
Not using local scripts makes no sense in this situation. Do you understand the difference between local and regular script?
In short, local script runs directly on client's computer, while regular script runs on the server machine, that has nothing to do with visual and rendering related stuff.
It would be good if you explained why you want to avoid using local scripts, because I don't understand which is your misconception here.