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

Doesn't work in studio but works fine in normal servers?

Asked by 6 years ago
game.Players.PlayerAdded:connect(function(plr)
    local stats = Instance.new("Model", plr)
    stats.Name = "Stats"
    local Money = Instance.new("IntValue", stats)
    Money.Name = "Money"
    local xp = Instance.new("IntValue", stats)
    xp.Name = "XP"
    local XPMAX = Instance.new("IntValue", stats)
    XPMAX.Name = "XPMAX"
    XPMAX.Value = 1000
    local fill = script.Parent.Fill
    local xpNum = script.Parent.TextLabel
while wait() do
    wait(1)
        fill.Size = UDim2.new(xp.Value/XPMAX.Value,0,0,30)
    xpNum.Text = xp.Value.."/"..XPMAX.Value.."-XP"
end
end)

localscript inside startergui

It works inside the game, but not in roblox studio? Filtering is enabled

0
funny, it's like the reverse problem I mostly have with FE enabled xD User#20388 0 — 6y
0
It doesn't matter if it doesn't work in studio. It works in game, and that's all that matters. Crazycat4360 115 — 6y
0
Why have you put this in a local script in the starter gui. The server should be creating the stats and managing them not the individual player. User#5423 17 — 6y

Answer this question