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

How do I use functions, please explain?

Asked by 4 years ago

how can i use functions? i tried doing this

function = local function(Give,x)
instance.new("leaderstats")
instance.parent = x
end

Give(game.Players.Player1,1)

1 answer

Log in to vote
0
Answered by 4 years ago

you will should do

local function Give(x)
local Instanc = instance.new("Folder")
instanc.Name = "LeaderStats"
instanc.Parent = x
end

Give(game.Players.Player1,1)
0
Here's what it should look like local function give(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player end give(game.Players.LocalPlayer) CataclysmicDev 46 — 4y
Ad

Answer this question