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

how to use clone method if user buys gamepass?

Asked by 9 years ago
id = ######### -- i'll insert gamepass id here
for i , v in pairs(game.Players:GetPlayers()) do
    player = v.userID
    if game:GetService("Gamepass Service"):PlayerHasService(player, id)
--how would i use the clone method and clone a tool ...
---i suppose id put tool in replicatedstorage and call a clone method but not sure how to call 
--clone 
    end
end

1 answer

Log in to vote
0
Answered by
Tynezz 0
9 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.
local id = 0
for _,v in pairs(game.Players:GetPlayers()) do
local service=game:GetService("GamePassService")
if server:PlayerHasPass(v,id) then
local clone = whereyourtoolis:Clone()
clone.Parent=v:WaitForChild("Backpack")
end end
Ad

Answer this question