PointLight script not working

Hello! Today i made a script that when it’s Parent is touched, moves a part from ServerStorage to workspace and then changes it’s PointLight range .
When i touch the script Parent, the part is moved to workspace but it wont change the PointLight range, can anyone tell me what’s wrong here?

Screenshot 2021-08-25 142047
Screenshot 2021-08-25 142201
Screenshot 2021-08-25 142259

your indexing a property, your LightRange variable was set to the value of the range at the top, you arent changing the property, you are changing the variable. Make it

LightRange = game.ServerStorage.Orb.PointLight

LightRange.Range = something
2 Likes

Thank you for the help! It worked.