|
| 21 Feb 2017 03:23 PM |
| Hello! I'm having trouble making a script, for me. What I'm saying is, I have 2 teams in ## game, and I connected them with Button GUI's. I named one of them, "Founder/Game Creator", and what I need to know is how do I make that button only make ME, ### Game Creator, spawn at ## Spawn location I put in a Security Rooom I made I for myself, not ### Visitors Spawn? Please help. |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2017 03:28 PM |
Copy and paste the below script I wrote.
script.Parent.MouseButton1Click:Connect(function() -- when the button is clicked local plr = game.Players.LocalPlayer -- defining player variable if plr.UserId == UserIdHere then -- Get this from the URL on your profile. (Number) plr.TeamColor = "color" -- Replace color with the exact color the Team is plr:LoadCharacter() -- Respawns the player end end
|
|
|
| Report Abuse |
|
|
|
| 21 Feb 2017 03:42 PM |
| Thanks! Appreciate your help. |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2017 03:45 PM |
| Wait, when I published it, it did not work for some reason when I logged out. Did I need to place this in StarterGUI or Teams? |
|
|
| Report Abuse |
|
|