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

How do I make this line in my script work? Can't figure out the proper way to put it.

Asked by
ghxstlvty 133
3 years ago
Edited 3 years ago

How do I make the stuff in line 3 worded properly? So that it finds the Players Car in the workspace.

game.ReplicatedStorage.ArrowLeft.OnServerEvent:Connect(function(plr)
    local plrName = plr.Name
    game.Workspace[plrName"'s Car"].Body.ELS.Lightbar.on.Value = 11
end)

1 answer

Log in to vote
1
Answered by 3 years ago
 game.Workspace[plrName .. "'s Car"].Body.ELS.Lightbar.on.Value = 11

You use 2 periods (..) to combine the 2 strings.

0
Thanks, forgot about this. I took a break for like a year. ghxstlvty 133 — 3y
Ad

Answer this question