Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to change values of ObjectValues?

Asked by 5 years ago

Its probably incredibly easy but when i do ObjectValue.Value = game.Workspace.Part it wont change the value

0
It should work. Maybe ObjectValue and Part is nil. User#22219 20 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

I think that your problem is that you are forgetting to define where ObjectValue is located. I tried this out and it worked:

local oValue = game.Workspace.ObjectValue
oValue.Value = game.Workspace.Part
local part = oValue.Value
print(part.Name)

I hope this helps. Have a great day scripting!

Ad

Answer this question