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

What does "Expected assignment or function call" mean?

This is the code

script.Parent.MouseButton1Click:Connect(function(player)
	
	local v1 = math.random(1, 255)
	local v2 = math.random(1, 255)
	local v3 = math.random(1, 255)
	
	game.StarterPlayer.StarterCharacter["Top Hat"]BrickColor = Vector3.new(v1, v2, v3) --error

end)

3 comments

0

The code is a bit distorted but you get the idea

0

You forgot . after ['Top Hat'] as the other guy said, the error means that the debugger excepts you to call it like a function (with brackets) or set new value of it.

0

This question has been closed because you have not provided an explanation with your question. Just posting code is not enough information for us to know the context of your perception!

1 answer

✓ Accepted answer

The error itself means that what you have just presented to the script is not something it can execute, but it appears you are missing a . after ["Top hat"]

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