Hello, I am making a new game. I want to spin the Bottle. I think i am corret but this script isn't working.Can i get an help?
part = script.Parent
a = 0
local pigs
pigs = 1
while pigs do
part.Orientation.Y = part.Orientation.Y + 0.01
wait(0.001)
end
pigs = 0
b = math.random(0,15)
wait(b)
local playing = false
while playing do
if playing == false then
waittime = math.random(0,10)
part.Orientation = Vector3.new(0,1,0) - Vector3.new(0,1,0)
wait(waittime)
playing = true
end
end
Here is the Error.
14:20:09.192 - Stack Begin 14:20:09.192 - Script 'Workspace.Sise.SpinScript', Line 6 14:20:09.193 - Stack End

3 comments
I don't think you can set a specific rotation value (X,Y,Z) pretty sure they're read only, so change it to part.Orientation = part.Orientation + Vector3.new(0,0.1,0)
Can you give the error from outside the stack?
Your script will never make it past that first while loop.