why is "car" not a valid member of workspace?
Asked by
4 years ago Edited 4 years ago
Ok, so I was making an error frame in ScreenGui number 1 in case that the car = nil and the localscript in ScreenGui number 2. Here is the code:
1 | if not workspace.Car then |
2 | if game:GetService( "UserInputService" ).TouchEnabled then |
3 | script.Parent.Parent.Parent.screen.Frame:TweenPosition(UDim 2. new( 0.216 , 0 , 0.162 , 0 )) |
4 | elseif game:GetService( "UserInputService" ).KeyboardEnabled then |
5 | script.Parent.Parent.Parent.screen.Frame:TweenPosition(UDim 2. new( 0.344 , 0 , 0.3 , 0 )) |
For some reason the output is Car is not a valid member of Workspace .
Any help will be appreciated, thank you.