function onClick()
			game.Lighting["Card"]:Clone().Parent = game.Players.LocalPlayer.StarterGear
			game.Lighting["Card"]:Clone().Parent = game.Players.LocalPlayer.Backpack
	end
script.Parent.MouseButton1Click:connect(onClick)

It is a SurfaceGui TextButton script.

3 comments

0

LocalPlayer can ONLY be used in a LocalScript.

0

I put it in LocalScript, but it won't work.

1

LocalScripts will only work in a player's character, backpack, playergui, or playerscripts. You would need to modify your code to find the SurfaceGui.