Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I use functions, please explain?

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

✓ Accepted answer

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)

1 comment

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.