ReplicatedStorage Issue

Basically, I’m doing a script so that whenever the Tikki gets duplicated, the cash would spawn. But it has not been doing that, instead, it disabled the ClickDetector and I am very confused right now.

How can I fix this issue without deleting the whole script I made?
:arrow_down:

local Tikki = script.Parent
local ClickDetector = Tikki.ClickDetector

local replicatedStorage = game:GetService("ReplicatedStorage")
local cash = replicatedStorage:WaitForChild("cash")

ClickDetector.MouseClick:Connect(function()
	local newCash = cash:Colone()
	local Tikkiposition = Tikki.Position
	local cashPosition = Tikkiposition + Vector3.new(0,0,6)
	newCash.Position = cashPosition
	newCash.Parent = workspace
end)
1 Like

Is the script a client code? Probably the problem is there.

Try to change local newCash = cash:Colone() to local newCash = cash:Clone()

Why would that cause an issue? Replicated storage works in both module scripts, local scripts and server scripts so it should not really cause any issue.

It’s correctly, I’m confused, sorry.

local newCash = cash:Colone()

Should be

local newCash = cash:Clone()

You spelt Clone incorrectly.

Change it from

local newCash = cash:Colone()

to

local newCash = cash:Clone()

I didn’t even notice that I spelt clone “colone” O_O

thank you all.