|
| 20 Jul 2012 10:24 AM |
mode = script.Parent.Parent.Mode boop = script.Parent.Parent.TextBox.Text
function onButtonClicked() if mode.Text == "Punish" then game.Players.boop.Character.Parent = game.Lighting end end script.Parent.MouseButton1Down:connect(onButtonClicked)
I want it to Punish the person with the username in the TextBox So if it said in the TextBox Shedletsky it would punish the user Shedletsky. Please help! |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2012 10:26 AM |
mode = script.Parent.Parent.Mode boop = script.Parent.Parent.TextBox function onButtonClicked() if mode.Text == "Punish" then pcall(function() game.Players[boop.Text].Character.Parent = game.Lighting end) end end script.Parent.MouseButton1Down:connect(onButtonClicked) I used pcall to prevent errors, but you could do if game.Players:FindFirstChild(boop.Text) then -[ I am, the man, who can script. ]- |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2012 10:26 AM |
mode = script.Parent.Parent.Mode boop = script.Parent.Parent.TextBox
script.Parent.MouseButton1Down:connect(function() if mode.Text == "Punish" then game.Players[boop.Text].Character.Parent = game.Lighting end end)
|
|
|
| Report Abuse |
|
|
| |
|