I want to make a button that has a clickdetector that can spawns a random model, but literally theres nothing on how to do it, can anyone tell me a script that tells me that's recent? Edit: to be more clear, I need a script that spawns a random Model out of many from ReplicatedStorage to a part shows where the models spawn, but unfortunately I am unable to find one
Before writing this script, you muse have a PrimaryPart set for your model in order to move it to any position and place your model in ServerStorage for safe keeping
ServerStorage = game:GetService('ServerStorage') -- getting the ServerStorage model = ServerStorage:WaitForChild('Model') -- refrencing your model ClickDetector.MouseClick:connect(function() local GoalPosition = part.Position -- Set this variable as the part position where you want your model to spawn in local ModelClone = model:Clone() -- Cloning the model that you want to spawn in ModelClone.Parent = workspace -- placing the model onto workspace ModelClone:MoveTo(GoalPosition) -- Placing your model to the position that you want end)