axelvts
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 3029 |
|
|
| 20 Apr 2015 04:38 PM |
"Workspace.Animation Handler (put in workspace):3: attempt to index field 'Character' (a nil value)"
Was in my output...
----------------------------------------
This is the script:
function onPlayerRespawned(newPlayer) while true do if newPlayer.Character:findFirstChild("Animate")~=nil then break end wait() end newPlayer.Character.Animate.Disabled = true local c = script.Anima:Clone() c.Parent = newPlayer.Character c.Disabled = false end
function onPlayerEntered(newPlayer) newPlayer.Changed:connect(function (property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end
game.Players.PlayerAdded:connect(onPlayerEntered) |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2015 04:39 PM |
wait(1) at the top
God grant me the wisdom to not punch stupid ppl, for I know I will go to prison. |
|
|
| Report Abuse |
|
|
| |
|
axelvts
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 3029 |
|
|
| 20 Apr 2015 04:49 PM |
Well, that output doesn't come up, but the script still doesn't work.
---
BTW, if I'm using a custom character, does it still use "Character?"
Because according to the Roblox lua site, the desc. of Character is:
"A model containing the humanoid, arms, legs, torso, and scripts of a player's character."
So if there is no parts named arms or legs, is it automatically not a Character? |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2015 04:51 PM |
I have a problem like this as well! I always says my guy is nil.... |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Apr 2015 05:12 PM |
do wat i said or get BSoD
God grant me the wisdom to not punch stupid ppl, for I know I will go to prison. |
|
|
| Report Abuse |
|
|
axelvts
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 3029 |
|
|
| 20 Apr 2015 05:27 PM |
I did do what you said. It got rid of the output, but the script still does nothing... |
|
|
| Report Abuse |
|
|
axelvts
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 3029 |
|
|
| 20 Apr 2015 05:28 PM |
| Also, what does BSoD mean??? |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 20 Apr 2015 05:29 PM |
game.Players.PlayerAdded:connect(function(player) --do stuff to player player.CharacterAdded:connect(function(char) --do stuff to character end) end) |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2015 05:29 PM |
| yea, what DOES bsoddodododdodo mean |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
| |
|
xman262
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 19094 |
|
|
| 20 Apr 2015 05:36 PM |
Hey how do you type the squiggly line on the keyboard?
Lord Of The Epic Face R$526/R$10,000 |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2015 05:36 PM |
Axe, I just solved my problem by doing the following: 1. Make a new script and put it in StarterPack or StarterGui 2. Copy and paste everything you have in onPlayerRespawned AKA: while true do if newPlayer.Character:findFirstChild("Animate")~=nil then break end wait() end newPlayer.Character.Animate.Disabled = true local c = script.Anima:Clone() c.Parent = newPlayer.Character c.Disabled = false
3. Paste it in the script 4. Copy Anima and put it in the new script 5. Bewm it works |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 20 Apr 2015 05:37 PM |
| Or you can use CharacterAdded |
|
|
| Report Abuse |
|
|
axelvts
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 3029 |
|
|
| 20 Apr 2015 05:56 PM |
| TrainingToTroll, I tried doing something like that and I don't think I understood properly/ I can't fix the script errors... Mind making a model for me? |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Apr 2015 06:24 PM |
| Wait, are you trying to make a new animation? I already have something for that. |
|
|
| Report Abuse |
|
|
axelvts
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 3029 |
|
|
| 20 Apr 2015 08:19 PM |
| Erm... An animation rig... Yes? |
|
|
| Report Abuse |
|
|