I'm making a random wheel that when the pointer (Model) is clicked, it spins the wheel for 5 seconds and lands on a choice. However when you click the pointer it doesn't spin the wheel. This is my script,
script.Parent.Parent.Model.ClickDetector.MouseClick:Connect(function()
local Wheel = script.Parent
local a = 0
repeat
Wheel.Rotation = Vector3.new( a, 0, 0)
wait(.01)
a = a+3
until pigs == 10
wait (5)
pigs ==1
)

4 comments
Well much that I don't understand, and I assume this is not the entire script. But I'll just say that a ClickDetector needs to be in a Part, doesn't work in a Model
Well actually that is the entire script
Okay well to start with then, you need to declare your variables, pigs doesn't exist. And you need an end after a function. And don't use repeat until loops, use for loops. You never create nor update pigs, so the loop is indefinite
And name your variables better, pigs is just weird