Starify
|
  |
| Joined: 21 Jul 2013 |
| Total Posts: 5606 |
|
|
| 09 Aug 2013 11:43 AM |
script.Parent.Touched:connect(function(collision) local player = false;
pcall(function() if (game.Players:GetPlayerFromCharacter(collision.Parent)) then player = game.Players:GetPlayerFromCharacter(collision.Parent) end end)
if (player) then script.Parent.BrickColor = player.TeamColor for _, v in pairs(player.leaderstats:GetChildren()) do if (v:IsA('IntValue')) then v.Value = 0 end end end end)
------------------------------------- What is supposed to do, when you touch it, it does the following things: - Resets your leaderboardstats (KOs, Wipeouts) values to 0 - Changes your team to the color of the brick (Say, if the brick color was blue, your team would be changed to the blue team) - Respawns your character without gaining a wipeout
So far, only the first one is working. (Reseting leaderboardstats)
★ [ TSC Imperator Starify ] ★ |
|
|
| Report Abuse |
|
|
Xtreme101
|
  |
| Joined: 03 Jan 2009 |
| Total Posts: 4385 |
|
| |
|
tummey2
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 1802 |
|
|
| 09 Aug 2013 11:50 AM |
| Why are you running in pcall? You're not going to get any output if you do that... |
|
|
| Report Abuse |
|
|
Starify
|
  |
| Joined: 21 Jul 2013 |
| Total Posts: 5606 |
|
|
| 09 Aug 2013 11:50 AM |
12:31:55.014 - DataModel Loading http://www.roblox.com/asset/?id=125457533 logging probability 0.58494827112644 not logging 12:36:31.394 - Auto-Saving... 12:41:31.852 - Auto-Saving... 12:46:31.748 - Auto-Saving... > script.Parent.Touched:connect(function(collision) local player = false; pcall(function() if (game.Players:GetPlayerFromCharacter(collision.Parent)) then player = game.Players:GetPlayerFromCharacter(collision.Parent) end end) if (player) then script.Parent.BrickColor = player.TeamColor for _, v in pairs(player.leaderstats:GetChildren()) do if (v:IsA('IntValue')) then v.Value = 0 end end end end) 12:50:03.282 - script.Parent.Touched:connect(function(collision) local pl:1: attempt to index global 'script' (a nil value) 12:50:03.289 - Script "script.Parent.Touched:connect(function(collision) local pl", Line 1 12:50:03.289 - stack end
★ [ TSC Imperator Starify ] ★ |
|
|
| Report Abuse |
|
|
Xtreme101
|
  |
| Joined: 03 Jan 2009 |
| Total Posts: 4385 |
|
|
| 09 Aug 2013 11:53 AM |
| You're trying to run this script through a command? That's not going to do anything... |
|
|
| Report Abuse |
|
|
Starify
|
  |
| Joined: 21 Jul 2013 |
| Total Posts: 5606 |
|
|
| 09 Aug 2013 11:54 AM |
No, I'm trying to run in through a script in a brick..
★ [ TSC Imperator Starify ] ★ |
|
|
| Report Abuse |
|
|