My script is not work when im clone the model

simple, i have this script inside my cat model but when I’m cloning it, it not working

I’m using GUI text button to spawn car
asd2

and my cat is inside ReplicatedStorage
asd1

this it the GUI text button spawn script (“clonecar”)

local car = game.ReplicatedStorage.car

local bouuton = script.Parent

bouuton.MouseButton1Click:Connect(function()
	local clonecar = car:Clone()
	clonecar.Parent = workspace

	
	local rng = math.random(1, 10)
	clonecar:MoveTo(Vector3.new(rng, rng, rng))
	
end)

this it the script inside cat model (“MeowScript”)

local moew = script.Parent.Sound

while true do
	wait(math.random(1, 10))
	moew:Play()
end

thx for help in the future =w=‘’

2 Likes

The client cannot clone server scripts as the server does not replicate them, fire a RemoteEvent from the MouseButton1Click connection and perform the entire giving event on the server

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.