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 » Scripting Helpers
Home Search
 

Re: "bad cast"?

Previous Thread :: Next Thread 
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
24 May 2014 12:30 PM
I got this error message, but I don't know what to do about it?:
10:27:52.754 - bad cast
10:27:52.756 - Script 'Workspace.Start', Line 111 - global Suiting
10:27:52.756 - Script 'Workspace.Start', Line 31 - global Start
10:27:52.756 - Script 'Workspace.Start', Line 171
10:27:52.757 - Stack End

Here is the part of the script (line 111+) that makes this error. BTW, everything is defined correctly because the script works, just stops after:
for _,player in pairs(game.Players:GetPlayers()) do
if player.TeamColor == BrickColor.new("Bright yellow") then
khead.Parent = player.Character
local weld = Instance.new("Weld", Workspace)
weld.Part0 = player.Character.Helmet --Line 111
weld.Part1 = player.Character.Head
end
end

ℱoggedOut ~
Report Abuse
LittleLumpOfButter is not online. LittleLumpOfButter
Joined: 14 Sep 2013
Total Posts: 1526
24 May 2014 12:34 PM
I thought in good grammar you used a space after a comma ;-)
ok I think the error is whenever you mention workspace

try using game.Workspace
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
24 May 2014 12:36 PM
still gives the same error

ℱoggedOut ~
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
24 May 2014 12:39 PM
bump plz help

ℱoggedOut ~
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
24 May 2014 12:43 PM
What is bad cast anyways? I cant even find it on the Wiki

ℱoggedOut ~
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
24 May 2014 12:46 PM
just waiting for help... qq

ℱoggedOut ~
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
24 May 2014 01:18 PM
Parent it to the helmet after and make sure helmet exists and is a part

local weld = Instance.new("Weld")
weld.Part0 = player.Character.Helmet --Line 111, make sure
weld.Part1 = player.Character.Head
weld.Parent = player.Character.Helmet
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
24 May 2014 01:25 PM
It still gives the error bad cast to line 111

ℱoggedOut ~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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