I tried searching up how to do it, and still, it won't work. Here is my code.
function leftClick() game.ServerStorage.freecards:Clone().Parent = workspace end
You’re having the same issue like last time. You made the function but you’re not calling the function. It should also be in a regular script.
local ss = game:GetService("ServerStorage") --this makes serverstorage a variable that you could easily use. local freecards = ss:WaitForChild("freecards") --this creates an easy reference to the object you’re cloning function leftClick() local freecardsclone = freecards:Clone() --clones the object freecardsclone.Parent = game.Workspace --moves the object to workspace end --Now we have to call the function script.Parent.MouseButton1Click:connect(leftClick) -- Waits until the button is clicked
I haven’t tested this yet but I hope it works.
UPDATED ANSWER
You need to use Events. These can transport info between the server and the client. You need to make two scripts. One that will make the event fire, and one that spawns the thing when the event is received. You can read how to do this here: https://developer.roblox.com/ko-kr/articles/Remote-Functions-and-Events
I hope this helps you!
Best,
TheLastHabanero