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

Why does this script sometimes show leaderstats but not always?

Asked by 6 years ago

--[]-- game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model") leaderstats.Name = "leaderstats" leaderstats.Parent = player local Stage = Instance.new("IntValue") --We create a new IntValue Stage.Name = "Stage No." --this is the name you want the leader-stat to be when it shows up in-game. Stage.Value = 0 --this is the value of money the new player starts out with. To change this, you can add some more code (shown later) Stage.Parent = leaderstats -- Set the money object as a child of the leaderstats object. end) --[]-- --[]-- Assets = {755156652,327081386,833322858} for _, asset in ipairs(Assets) do game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=" .. asset) end --[]--
0
try to replace leaderstats for a IntValue HillsMaster 34 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

you can try to set the leaderstats generation to a IntValue. and insert the generator In serverscriptservice

something like this

game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Instance.new("IntValue",player)
    leaderstats.Name = "leaderstats" --Or your name for it
0
I'll accept this, but i've fixed it by changing instance.new to folder instead of model RealRexTerm 21 — 6y
0
ok HillsMaster 34 — 6y
Ad

Answer this question