I made a simple script that is suppose to make a part spin. it didn't work for some reason which I don't know!
The error is:
Workspace.Part.Script:3: attempt to perform arithmetic on global 'y' (a nil value)
Here is the script it self:
function Spin() wait(0.1) script.Parent.Rotation = CFrame.Angles(x,y+10,z) end while true do Spin() end
function Spin(x,y,z) wait(0.1) script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(x,math.rad(y),z) end while true do Spin(0,1,0) end