Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

attempt to concatenate field 'Value' (a userdata value)?

Bi\HighestBidder is actually a ObjectValue on workspace and this script is inside a text label.

Error appears on line 6

local Bidder = workspace.HighestBidder

script.Parent.Text = "Highest Bidder: Nobody"

Bidder.Changed:Connect(function()
	script.Parent.Text = "Highest Bidder: "..Bidder.Value
end)

1 answer

✓ Accepted answer

Your value is most likely an ObjectValue, and thus stores a string rather than an object (which is considered UserData). To solve this, you can either store the bidder's in a StringValue in the first place, or just add .Name at the end of the line:

local Bidder = workspace.HighestBidder

script.Parent.Text = "Highest Bidder: Nobody"

Bidder.Changed:Connect(function()
    script.Parent.Text = "Highest Bidder: "..Bidder.Value.Name
end)

1 comment

0

Thanks! Worked!

This discussion is preserved as it was. New answers, comments, and votes are closed.