7GrandDadPGN / VapeV4ForRoblox

Vape V4 for Roblox, A project that has been in development for 4+ years.
Creative Commons Zero v1.0 Universal
190 stars 337 forks source link

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

Closed easyontop closed 1 year ago

easyontop commented 1 year ago

title

RealPacket commented 1 year ago

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.

easyontop commented 1 year ago

7GrandDad fixed