Hello,
I'm trying to find an object in the workspace by using a value. When printing the value, it prints out the value "WM830" as a string. But it's not finding the model in the workspace.
This is the code:
script.Parent.MouseButton1Click:connect(function() local busId = script.Parent.Parent.Parent.Car.value game.Workspace[busId].Body.Display.maindest.SurfaceGUI.TextLabel.text = "Woop" end)
This is the error:
Players.E_Link.PlayerGui.A-Chassis Interface.NXUI.TextButton.Script:3: bad argument #2 to '?' (string expected, got Object)
Value classes have a Value property that contains the value.
Change line 2 to:
local busId = script.Parent.Parent.Parent.Car.value.Value