I have a script that is not working even though I am trying to put it in right. Its a script that is suppose to spawn a random model from a folder in "Lighting". But it doesn't work no matter what I do. Please help
Here is the script:
clicker = script.Parent clicker.ClickDetector.MouseClick:Connect(function(player) local models = game.Lighting.Models:GetChildren() --get a random model by picking a random number in the range of 1 through the number of models inside the models group/folder: local randomModel = models[math.random(1,3 #models)] --clone model and put it into workspace: local modelClone = randomModel:Clone() modelClone.Parent = game.Workspace end)