Why does a Item not work when its cloned from Replicated storage to the backpack

While making a shop GUI I noticed that when I cloned a Coil from rep storage to a backpack the scripts in the coil didn’t work. If anybody knows how to fix it please tell me ASAP

Sincerely, DevBattery

NOTE: The items are made by ROBLOX

3 Likes

well could you show your script first

Its by roblox just use this command in the command bar to see the scripts

local id = 99119158 game:GetService(“InsertService”):LoadAsset(id).Parent = workspace

could you show cloning script?

no, the script that you use to clone the coil from rep storage to backpack

yes heres the code

``Player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()

	if Player.leaderstats.Coins.Value >= 500 then
		Player.leaderstats.Coins.Value = Player.leaderstats.Coins.Value - 500

	game.ReplicatedStorage.SpeedCoil:Clone().Parent = Player:WaitForChild("Backpack")
	print("bought")  
	end     
end)

``

check the reply I gave to AtomTostcu :slight_smile:

Your mistake is doing it from client-side. Also if you change your coin value from client you can not save it because server can’t see it. So try using remote events to buy and clone the coil to backpack.

the script that is managing the coil is server-sided, you’re cloning the coil on the client side. You have two options:

  1. use a remote to clone the coil from the server side
  2. change the script that’s managing the coil to a local script
7 Likes

the coil manager being the script that gives the coil right?

the scripts inside the coil
image

worked (Question making the scripts local means only the client can see the speed?)

1 Like

character’s position will replicate to the server regardless if it was changed from the client or server

1 Like

Oh thanks for the explanation I understand now!

1 Like