How do I clone a part so multiple players can use the parts?

I have a remote event that triggers a serverside script whenever I click a certain key and it clones parts from ServerStorage but whenever the move activates and a different player activates the move it does this Place1 - Roblox Studio (gyazo.com)
how would I make it so everyone can use the move rather than one person?
I tried looking through the script that clones the parts from the Server Storage to see if the problem was in this but I couldn’t find anything
Script That Clones -

local Repl = game:GetService("ReplicatedStorage")
local Remote = Repl:WaitForChild("RemoteEvent")
local orgin = game.ServerStorage.Part
local orgin3 = game.ServerStorage.MeshPart3
local copy = orgin:Clone()
local orgin2 = game.ServerStorage.MeshPart
local copy2 = orgin2:Clone()
local copy3 = orgin2:Clone()
copy2.Size = Vector3.new(0, 0, 0)
local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(
	5, --length
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)
local Info2 = TweenInfo.new(
	1, --length
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.InOut,
	3,
	false,
	0
)


local Info3 = TweenInfo.new(
	1, --length
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.InOut,
	3,
	false,
	0
)
local goals3 = {
	Size = Vector3.new(22.961, 0.121, 23.079)
}
local goals4 = {
	Size = Vector3.new(40.183, 0.121, 39.515
	)
}
local Increasepart3 = TweenService:Create(copy2, Info2, goals3)
local Increasepart4 = TweenService:Create(copy3, Info3, goals4)

Remote.OnServerEvent:Connect(function(plr)
	copy2.Size = Vector3.new(0, 0, 0)
	copy3.Size = Vector3.new(0, 0, 0)
	copy2.Parent = game.Workspace
	copy3.Parent = game.Workspace
	copy.Size = Vector3.new(3.52, 3.52, 3.52)
	copy.Parent = game.Workspace
	print("Dun2")
	local humr = plr.Character.HumanoidRootPart
	local humrL = plr.Character.LeftFoot
	Increasepart3:Play()
	Increasepart4:Play()
	copy2.Position = humrL.CFrame:PointToWorldSpace(Vector3.new(0, 0, 0)) 
	copy3.Position = humrL.CFrame:PointToWorldSpace(Vector3.new(0, 0, 0)) 
	copy.Position = humr.CFrame:PointToWorldSpace(Vector3.new(0, 20, 0)) 
	wait(0.4)
	local goals = {
		CFrame = humr.CFrame:ToWorldSpace(CFrame.new(0, -250, -600));
	}
	local goals2 = {
		Size = Vector3.new(50, 50, 50)
	}
	local Increasepart = TweenService:Create(copy, Info, goals)
	local Increasepart2 = TweenService:Create(copy, Info, goals2)
	Increasepart2:Play()
	wait(2)
	Increasepart:Play()
	wait(2)
	copy.Parent = game.ServerStorage
	copy2.Parent = game.ServerStorage
	copy3.Parent = game.ServerStorage

end)

Try putting the cloning inside the on server event and destroy it once the player is done using it.

2 Likes

I put it inside the server event and it worked! Thanks

Is there a reason that you:

  1. Clone all this on the server
  2. Don’t just do it when the player needs it
  3. Don’t verify any of the incomming requests. That’s just asking for someone to exploit your game.

Oh, this wasn’t anything serious wasn’t planning on publishing this to an offical game or anything.
My goal was just to see if I could script a ball expanding and tweening it so it would move.
I just recently learned a bit about scripting from TheDevKing i’m trying to learn more and expirment with stuff. But i’ll take into account what you said when I create more scripts into the future.

Hey man, there is no need to be toxic here. He is just learning how to script and to him, it might seem less basic than you think.

Actually I should I apologize. Sorry.