I have a remote event (server to client).
I clone a textbutton inside on the server side and send the clone to the client
It says that it cant find the textbutton that has been cloned on the server side
SERVER
local GemsButtons_Folder = game:GetService("ServerStorage"):WaitForChild("GemsButtons_Folder")
local ClonedGemButton = GemsButtons_Folder:FindFirstChild(gem.Name):Clone()
Inventory_Event:FireClient(plr, ClonedGemButton:Clone())
ClonedGemButton.Parent = Inventory
the print statement in client prints nil
I know that I can put the gemfolder in the replicatedstorage to fix this issue, but I dont want to move the folder. Is there a way to fix it?
I assume it’s because you’re using fireclient with a random clone that might be in nil, how about you try moving it to the player’s playergui before firing it on their client, or just fire the client with the name of the button?
local ClientCopy = ClonedGemButton:Clone()
ClientCopy.Parent = plr:WaitForChild("PlayerGui")
Inventory_Event:FireClient(plr, ClientCopy)
replicatedstorage shows on both the client and the server, but I recall you saying your buttons were in serverstorage, so I get what you mean
I guess try the code I posted and hmu if it works