7GrandDadPGN/VapeV4ForRoblox

Size is not a valid member of Model "workspace.bed.Cake"

easyontop opened this issue · 1 comments

title

The error message "Size is not a valid member of Model "workspace.bed.Cake"" means that the Size property is not available on the Model instance named workspace.bed.Cake. This is because the Size property is only available on instances of the BasePart class, and the Model class is not a subclass of BasePart.

To fix this error, you can use the FindFirstChild method to get the first child of the Model instance that is a BasePart instance. Once you have a reference to the BasePart instance, you can then access the Size property.

For example, the following code will change the size of the first BasePart instance that is a child of the Model instance named workspace.bed.Cake:

local model = workspace.bed.Cake
local part = model:FindFirstChildOfClass("BasePart")
part.Size = Vector3.new(10, 10, 10)

This code will first get a reference to the Model instance named workspace.bed.Cake. It will then use the FindFirstChildOfClass method to get the first child of the Model instance that is a BasePart instance. Once it has a reference to the BasePart instance, it will then set the Size property to a new Vector3 instance with the values 10, 10, and 10.

This will make the BasePart instance 10 studs wide, 10 studs tall, and 10 studs deep.

7GrandDad fixed