So I have this script that keeps timing out, I have never been good with stuff like this and getting it to not time out, any help?
while true do
if script.Parent.Parent.Occupied.Value == true then
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,0,.05)
Do not use a while loop in most cases.
If you’re detecting a value, just use a
.Changed event and then change the CFrame when that fires.
if occupied.Value == true then
There is nothing in the else case. This means that if the value is false, it enters an infinite loop without yielding (waiting).