What do you want to achieve? Keep it simple and clear!
I want to move the model from replicated storage move to a designated spot
What is the issue? Include screenshots / videos if possible!
It doesnt move at all. No errors are shown.
local Giver = game.Workspace.PizzaGivers
local ThisGiver = Giver["Pizza Thing"] -- Rename to current giver
local Button = ThisGiver.Button
local Spawner = script.Parent
local Stored = game.ReplicatedStorage.Givers
local pizzas = {
Stored.TB1Pizza,
}
local function clicked()
Button.BrickColor = BrickColor.Black()
local copy = pizzas[math.random(#pizzas)]:Clone()
copy:MoveTo(Spawner.Position)
copy.Parent = workspace
task.wait(10)
copy:Destroy()
Button.BrickColor = BrickColor.Green()
end
wait(3)
Button.ClickDetector.MouseClick:Connect(clicked)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
OH. I think I know why. When parts are in ReplicatedStorage, their positions or anything else cannot be edited until they’re out of storage. Make MoveTo() appear after you set its parent to workspace. I had a problem similar to this once before.
Another thing, scripts don’t run in replicatedstorage.
That’s why there aren’t any errors. Because the position is being changed, but immediately being changed back because the part is still in ReplicatedStorage.