I made a button with a clickdetector and tried to make a script where one random model spawns into workspace out of many from ServerStorage. Unfortunately I am unable to complete this, and need help with this.
Here is the script I tried:
local Clicker = script.Parent --ClickDetector
local Object = game.ReplicatedStorage:WaitForChild("ObjectName") --Put your object name here
local ObjectSpawn = game.Workspace:WaitForChild("ObjectSpawn") --Object Spawner
ClickDetector.MouseClick:connect(function() --Fires on Click
local CloneObject = Object:Clone() --Clones the Object
CloneObject.Parent = game.Workspace -- Send's it to Workspace
CloneObject.Position = Vector3.new(ObjectSpawn.Position) --Change this to Position IF the script doesn't work = ObjectSpawn.CFrame.p
end)

3 comments
Please don't take this down
if you attempted a script, post it or nobody will help. and it sounds like you have tried a script
there u go robloxiandestroy