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: Wut?

Previous Thread :: Next Thread 
forgotoldacount is not online. forgotoldacount
Joined: 24 Sep 2009
Total Posts: 10460
18 Oct 2013 07:27 PM
Is there any reason this might be broke? Everything is correctly placed. The tool is in the lighting. I've been using this script a long time but it suddenly doesn't work.

function onChildAdded(child)
if child.Name == "SeatWeld" then
if child.Part1.Name == "Torso" then
player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
if player ~= nil then
tool = game.Lighting.Romaze:Clone()
tool.Parent = player.Backpack
end
end
end
end

function onChildRemoved()
if tool ~= nil then
tool:Remove()
end
end

script.Parent.ChildAdded:connect(onChildAdded)
script.Parent.ChildRemoved:connect(onChildRemoved)
Report Abuse
forgotoldacount is not online. forgotoldacount
Joined: 24 Sep 2009
Total Posts: 10460
18 Oct 2013 08:40 PM
Don't understand how a working script breaks :S
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
18 Oct 2013 08:41 PM
Don't use a localscript unless it's necessary. That's what I have noticed over the new updates.
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
18 Oct 2013 08:43 PM
SeatWelds broke in a new version, many people weep. Even wingman8, all his games have seats, they are all down now.
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
18 Oct 2013 08:44 PM
Replace

if child.Part1.Name == "Torso" then
player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)

with

-- It's the HumanoidRootPart Thingy.
if game.Players:GetPlayerFromCharacter(child.Part1.Parent) then
player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)

Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
18 Oct 2013 08:45 PM
Replace

-- It's the HumanoidRootPart Thingy.
if game.Players:GetPlayerFromCharacter(child.Part1.Parent) then
player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)


with

if game.Players:FindFirstChild(child.Part1.Parent.Name) then
player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)

Report Abuse
forgotoldacount is not online. forgotoldacount
Joined: 24 Sep 2009
Total Posts: 10460
19 Oct 2013 07:36 AM
Thank you its fixed
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