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

Since "LoadLibrary" is deprecated how do I alter this script?

Asked by
Fewice 22
5 years ago
Edited 5 years ago

How would I alter this leaderboard script to work with the current terms? It is only the first two lines that have the problem but I will include the whole script just incase. Thanks.

``` local cre = LoadLibrary('RbxUtility').Create

local create = function(class,parent)

return function(props)

local inst = cre(class)(props)

inst.Parent = parent

return inst

end

end

game.Players.PlayerAdded:connect(function(p)

local leaderstats = create('IntValue',p){

Name = 'leaderstats';

}

local stage = create('IntValue',leaderstats){

Name = 'Stage';

Value = 1

}

p.CharacterAdded:connect(function(c)

print('char')

local hrp = c:WaitForChild('HumanoidRootPart')

local stagep = workspace.Stages:FindFirstChild(tostring(stage.Value))

if not stagep then print('Stage not found') return end

wait(.1)

print('TP',stagep.CFrame)

hrp.CFrame = stagep.CFrame * CFrame.new(0,3,0)

print(hrp.CFrame)

end)

end) ```

Answer this question