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: Why does my error tell me that there is no character?

Previous Thread :: Next Thread 
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 04:16 PM
22:14:42.484 - Player is not a valid member of Workspace
22:14:42.486 - Script 'Players.Player.PlayerGui.LocalScript', Line 3
22:14:42.487 - Stack End

local workspace = game.Workspace
local Player = game.Players.LocalPlayer
local PlayerChar = game.Workspace[Player.Name]

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
soniclover88888 is not online. soniclover88888
Joined: 01 Feb 2008
Total Posts: 6723
16 Mar 2015 04:19 PM
Because the path you're setting it to would be;

PlayerChar = game.Workspace.game.Players.LocalPlayer.Name

see how that doesn't work?
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 04:21 PM
^

22:20:54.271 - Game is not a valid member of Workspace
22:20:54.272 - Script 'Players.Player.PlayerGui.LocalScript', Line 3
22:20:54.273 - Stack End

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
ShadowAley is not online. ShadowAley
Joined: 23 Jun 2010
Total Posts: 4823
16 Mar 2015 04:21 PM
Take the game out then
Report Abuse
FalconLoverGiraffe is not online. FalconLoverGiraffe
Joined: 24 Jun 2014
Total Posts: 456
16 Mar 2015 04:23 PM
Ah I see it:


print("FalconLoverGiraffe is teh best")
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 04:23 PM
^

22:22:24.592 - Players is not a valid member of Workspace
22:22:24.593 - Script 'Players.Player.PlayerGui.LocalScript', Line 3
22:22:24.594 - Stack End

You need []

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
soniclover88888 is not online. soniclover88888
Joined: 01 Feb 2008
Total Posts: 6723
16 Mar 2015 04:24 PM
I know my command doesn't work; it's an extended version of what you just typed.
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 04:25 PM
soniclover88888

the error here is that it does not actually find the character.

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
16 Mar 2015 04:25 PM
local Player = game.Players.LocalPlayer
local char = Player.Character


Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 04:32 PM
For some reason it still does not find the character.
22:30:12.296 - Players.Player1.PlayerGui.LocalScript:4: attempt to index field 'Character' (a nil value)
22:30:12.297 - Stack Begin
22:30:12.298 - Script 'Players.Player1.PlayerGui.LocalScript', Line 4
22:30:12.298 - Stack End

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 04:35 PM
This is a local script btw.

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
16 Mar 2015 04:37 PM
local Player = game.Players.LocalPlayer
repeat wait() until Player.Character
print("char should exist")
char = Player.Character

maybe that
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 04:43 PM
instawin

That works but it loops my script xD.
And clones a block 1000 times XD.

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
Augmentary is not online. Augmentary
Joined: 30 Aug 2013
Total Posts: 8081
16 Mar 2015 04:56 PM
then there's a problem with your script.
Report Abuse
murcury57 is not online. murcury57
Joined: 30 Jun 2010
Total Posts: 90299
16 Mar 2015 05:00 PM
[ Content Deleted ]
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
16 Mar 2015 05:02 PM
"local Player = game:GetService("Players")["LocalPlayer"]
local Character = Player.Character or Player.CharacterAdded:wait()"

Omg finally
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 05:03 PM
game.Players.PlayerAdded:connect(function(player)
print("Player Here")
player.CharacterAdded:connect(function(character)
print("Character Here")
local Chest = character.Torso
game.ReplicatedStorage.Armor:Clone().Parent = game.Workspace
local Armor = game.Workspace:WaitForChild("Armor")
local function weldBetween(a, b)
local weld = Instance.new("Weld")

weld.Part0 = a
weld.Part1 = b
weld.C0 = CFrame.new()
weld.C1 = b.CFrame:inverse() * a.CFrame
weld.Parent = a
return weld;
end
local function weldBetween2(a, b)
local weld = Instance.new("Weld")
weld.Name = "Weld2"
weld.Part0 = a
weld.Part1 = b
weld.C0 = CFrame.new()
weld.C1 = b.CFrame:inverse() * a.CFrame
weld.Parent = a
return weld;
end

weldBetween2(Armor.Middle1, Armor.Middle2)
weldBetween2(Armor.Middle1, Armor.Middle3)
weldBetween2(Armor.Middle1, Armor.Middle4)
-- 1
weldBetween2(Armor.Middle2, Armor.Middle1)
weldBetween2(Armor.Middle2, Armor.Middle3)
weldBetween2(Armor.Middle2, Armor.Middle4)
-- 2
weldBetween2(Armor.Middle3, Armor.Middle1)
weldBetween2(Armor.Middle3, Armor.Middle2)
weldBetween2(Armor.Middle3, Armor.Middle4)
-- 3
weldBetween2(Armor.Middle4, Armor.Middle1)
weldBetween2(Armor.Middle4, Armor.Middle2)
weldBetween2(Armor.Middle4, Armor.Middle3)
-- 4
Armor.Middle1.CFrame=CFrame.new(Chest.Position)
weldBetween(Armor.Middle1, Chest)
Armor.Middle2.CFrame=CFrame.new(Chest.Position)
weldBetween(Armor.Middle2, Chest)
Armor.Middle3.CFrame=CFrame.new(Chest.Position)
weldBetween(Armor.Middle3, Chest)
Armor.Middle4.CFrame=CFrame.new(Chest.Position)
weldBetween(Armor.Middle4, Chest)
end)
end)
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
16 Mar 2015 05:08 PM
"Omg finally"
My thoughts exactly. I guess nobody who posted here spends very much time making games.
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 05:08 PM
murcury57

I tried
game.Players.PlayerAdded:connect(function(player)
print("Player Here")
player.CharacterAdded:connect(function(character)
print("Character Here")

I have no clue how that does not work it does not even print player here.

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
16 Mar 2015 05:09 PM
NEVER EVER use PlayerAdded in a LocalScript.
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 05:10 PM
It's not a local script xD

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
16 Mar 2015 05:11 PM
Don't ever put Scripts anywhere but ServerScriptService, unless you don't want to set up a management system for things like parts getting cloned/genned.
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 05:11 PM
I change it to a regular script to use that method.
But it does not seem to work well xD.

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
handsomebob10 is not online. handsomebob10
Joined: 25 Sep 2010
Total Posts: 8259
16 Mar 2015 05:13 PM
JarodOfOrbiter

Ok but what is the reason this script does not work?

------------------------------------------------------------------------------------------------------------------------------------------------ "Impossible is a word to be found only in the dictionary of fools." - Napoleon Bonaparte ☊✪✪☊
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
16 Mar 2015 05:15 PM
You are not waiting for the character. Put it back the way you had it at the beginning of the thread, and then read the only decent suggestion.
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