generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Weird Error

Previous Thread :: Next Thread 
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
08 Jul 2015 12:23 AM
I keep getting this weird error from this script: "Workspace.Respawn1.Script:4: attempt to index local 'char2' (a nil value)"

The Script Itself:

script.Parent.Touched:connect(function(player)
local char = player.Parent
local char2 = game.Players:GetPlayerFromCharacter(char)
char2:LoadCharacter()
local humanoid = player.Parent:FindFirstChild("Humanoid")
if humanoid then
local inGame = char2:FindFirstChild("InGame")
if inGame then
inGame.Value = false
end
end
end)



Mixtape Coming Out 2020!
Report Abuse
Sharpy033 is not online. Sharpy033
Joined: 02 Jul 2008
Total Posts: 3851
08 Jul 2015 12:23 AM
your mixtape set the script on fire m8
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
08 Jul 2015 12:24 AM
Maybe. lol



Mixtape Coming Out 2020!
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
08 Jul 2015 12:28 AM
Wtf, your script is weird. Here's better script

script.Parent.Touched:connect(function(player)
player.Character:LoadCharacter()
local char2 = player.Character
local humanoid = player.Character:FindFirstChild("Humanoid")
if humanoid then
local inGame = char2:FindFirstChild("InGame")
if inGame then
inGame.Value = false
end
end
end)
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
08 Jul 2015 12:32 AM
@someonedie
"Character is not a valid member of Part" (Line 2)



Mixtape Coming Out 2020!
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
08 Jul 2015 12:33 AM
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Why does my mom smell like crap? Maybe I crapped on here. But I Really didn't. Maybe she crapped on her self.
Report Abuse
DopeMixtape is not online. DopeMixtape
Joined: 05 Jan 2015
Total Posts: 381
08 Jul 2015 12:35 AM
..... k



Mixtape Coming Out 2020!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image