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

How do I make individual player GUIs control different objects? [ANSWERED]

Asked by 10 years ago

I am trying to make it so people can control their car lights in my game. I don't need a script from you, I just am wondering how I could set it up so that a car is a property of a player.

1 answer

Log in to vote
2
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

Hmm. Well, in each car in the game, you could have a StringValue and it's name/value could be the Player's name. In the Button, you'll have it use the for loop to check every car to see if it has that value with the Player's name, then it'd toggle that.

Alternatively, you could change the model's name to say p.Name.."'s car"and have the button find it by using a = game.Workspace:findFirstChild(game.Players.LocalPlayer.Name.."'s car")

0
Thanks! You da man! Champion121212 22 — 10y
0
No problem. Shawnyg 4330 — 10y
Ad

Answer this question