Well, my problem is really anoying, just take a look at my script first:
local val = game.ReplicatedStorage.Value local sword = game.ServerStorage.ClassicSword while true do sword:Clone() --clone the sword sword.Parent = workspace --set parent local swordinwsp = workspace:WaitForChild("ClassicSword") swordinwsp.Handle.Position = Vector3.new(math.random(-95,171), 30, math.random(-84,181)) --random the position of the cloned sword val.Value = val.Value + 1 --don't care about this line wait(5) --delay end
That script
will make the sword clone and parent it in the workspace
but it only clone one and make it teleport it everywhere
Well, after searching internet for a while i made a new one, but worse
local val = game.ReplicatedStorage.Value local sword = game.ServerStorage.ClassicSword while true do sword:Clone().Parent = workspace --just quickly clone at set the parent local swordinwsp = workspace:WaitForChild("ClassicSword") swordinwsp.Handle.Position = Vector3.new(math.random(-95,171), 30, math.random(-84,181)) val.Value = val.Value + 1 --don't care about this line wait(5) end
And it just clone a sword and move it randomly and more cloned sword is coming from the middle of the workspace (not move to a random location)
I think there must be a way to fix it but I haven't figured out.
Really appreciate with your answer!
I don't know if you're looking for something like this, but yeah.
local ser = game:GetService("ReplicatedStorage") local w = ser:WaitForChild("Tool") local tool = ser:FindFirstChild("Tool") while true do local clone = tool:Clone() clone.Parent = workspace local x = math.random(-100,100) local z = math.random(-100,100) clone.Handle.CFrame = CFrame.new(Vector3.new(x,40,z)) wait(5) end