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

How to clone a script to the player?

Is there any possible method i can use to add a script on the player when he buy it on Shop?

1 answer

make sure this is in a local script :P

local player = game.Players.LocalPlayer

function Buy()
local script = game.Lighting.Script:Clone()
script.Parent = player
end

buybutton.MouseButton1Click:connect(Buy)

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