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

What does "Expected assignment or function call" mean? [closed]

Asked by 3 years ago

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)
0
The code is a bit distorted but you get the idea Stikeys 9 — 3y
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. imKirda 4491 — 3y
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! JesseSong 3916 — 3y

Closed as Non-Descriptive by JesseSong

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 3 years ago

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"]

Ad