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

Why is the gui only working in Studio and not in Regular Play(Please Read)?

Asked by 7 years ago

Leaderboard part-

01game.Players.PlayerAdded:connect(function(Player)
02    local leaderstats = Instance.new("IntValue",Player)
03    leaderstats.Name = "leaderstats"
04 
05    local Level = Instance.new("IntValue",leaderstats)
06    Level.Name = "Level"
07    Level.Value = 1
08    local XP = Instance.new("IntValue",leaderstats)
09    XP.Name = "XP"
10    XP.Value = 5
11    local Coins = Instance.new'IntValue'
12    Coins.Name = 'Coins'
13    Coins.Parent = leaderstats
14    Coins.Value = 100
15    local Gems = Instance.new("IntValue",leaderstats)
View all 27 lines...

The script is under Workspace

Gui Part-

01while true do
02    wait()
03 
04    local XP = script.Parent.Parent.Parent.Parent.Parent.leaderstats.XP.Value
05    local MaxXP = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Level.Value*150
06 
07    local math = ( XP / MaxXP )
08    repeat wait()until script.Parent.Parent.Parent.Parent.Parent
09    script.Parent:TweenSize(UDim2.new(math,0,1,0),"Out","Quad",.25)
10end

The script is inside a frame which is inside another frame in a screengui.

0
What does your Output say? Hydrogyn 155 — 7y
0
Nothing it works in studio but in game it doesnt do you mean the output in a normal play mode? duckyo011 36 — 7y
0
Found nothing in output duckyo011 36 — 7y

2 answers

Log in to vote
0
Answered by 7 years ago

You have to put the GUI in StarterGui.

0
dude i did xD duckyo011 36 — 7y
0
Its not that lol duckyo011 36 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

If your server is in Filtered Enabled, then you may have to connect a RemoteEvent onto the GUI to allow it to switch teams.

0
Let me try it duckyo011 36 — 7y

Answer this question