I need help with this Script

I need help for my code it’s not working. The code supposed to change the color of the light it’s not working.

Error Code: 10:04:14.721 Model is not a valid member of Workspace “Workspace” - Server - Script:1

You can use WaitForChild on the model to wait for it to exist before doing any changes. But the first thing I have to ask, do you have something called Model in your Workspace?

No. I don’t have a Model call that I using AlvinBlox videos

You need to change that line to suit the location of the pointlight you’re trying to change

What line? I’m confused. Mean the line of the script? Or like model???

The line you have in your script, it needs to properly locate the location of your PointLight, you said you don’t have anything in your Explorer called Model, so it’s going to error. How does your explorer look like and where is the PointLight located?

image

It should be

workspace.Baseplate.PointLight.Color = Color3.fromRGB(149, 255, 255)

PointLight is in the Baseplate that is in the workspace

1 Like

I’m still confused I moved it and it’s located at the baseplate. This is what AlvinBlox told me to put it.

A Model is a property name for the many parts or objects grouped to one, that’s a model. If you wanted to find the model not by its name but by its property you must use workspace:FindFirstChildOfClass(“Model”)

You must write workspace.Baseplate.PointLight

image

You moved the pointLight? Change workspace.Baseplate.PointLight to account for its new location

Thanks, @EmbatTheHybrid has solved this.

1 Like