|
| 04 Jun 2013 05:08 PM |
while true do wait(0) if (script.Parent.Value.Value == true) then onHit(function(char) for i,v in pairs(script:GetChildren()) do v:clone().Parent = char end end) end)
script.Parent.Seat1.Touched:connect(onHit)
The problem is the ends that I can see. What do I need to do to fix them? |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 04 Jun 2013 05:14 PM |
script.Parent.Seat1.ChildAdded:connect(function(Player) if(Player.Name=="SeatWeld" and Player:IsA("Weld") and Player.Part1)then Player = game.Players:GetPlayersFromCharacter(Player.Part1.Parent) if(Player)then for n,o in pairs(script:GetChildren())do o:clone().Parent=Player.Character end end end) |
|
|
| Report Abuse |
|
|
turbodaze
|
  |
| Joined: 17 Dec 2008 |
| Total Posts: 2169 |
|
| |
|
|
| 04 Jun 2013 05:27 PM |
I used that then added in a value and it still wont work :l
script.Parent.Seat1.ChildAdded:connect(function(Player) if(Player.Name=="SeatWeld" and Player:IsA("Weld") and Player.Part1)and script.Parent.Parent.Lock.Value == true then Player = game.Players:GetPlayersFromCharacter(Player.Part1.Parent) if(Player)then for n,o in pairs(script:GetChildren())do o:clone().Parent=Player.Character end end end end) |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2013 06:37 PM |
| Whats wrong with that script ^ |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
| |
|
|
| 04 Jun 2013 07:52 PM |
19:51:56.120 - Seat1 is not a valid member of Seat 19:51:56.121 - Script "Workspace.Unit5054.Seat2.Giver", Line 1 19:51:56.121 - stack end 19:51:56.122 - Humanoid is not a valid member of Script 19:51:56.122 - Script "Workspace.Unit5054.Seat2.Giver.AntiJump", Line 1 19:51:56.123 - stack end |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 04 Jun 2013 10:01 PM |
| You put the script in the seat, then tried to get Seat1 from the Seat, but Seat1 is not in Seat. |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2013 11:21 PM |
Well I fixed that part so the script looks like this. I am not sure what Part1 is however. I get no output from it.
script.Parent.ChildAdded:connect(function(Player) if(Player.Name=="SeatWeld" and Player:IsA("Weld") and Player.Part1)and script.Parent.Parent.Lock.Value == true then Player = game.Players:GetPlayersFromCharacter(Player.Part1.Parent) if(Player)then for n,o in pairs(script:GetChildren())do o:clone().Parent=Player.Character end end end end) |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2013 11:23 PM |
| bump, just helping out the thread :D. |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Jun 2013 02:53 AM |
repeat wait() until script.Parent.Value.Value == true function onhit(char) if char.Humanoid then for i,v in pairs(script:GetChildren()) do v:Clone().Parent = char end end end
script.Parent.Seat1.Touched:connect(onhit) |
|
|
| Report Abuse |
|
|
| |
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 05 Jun 2013 06:21 PM |
script.Parent.ChildAdded:connect(function(Player) if(Player.Name=="SeatWeld" and Player:IsA("Weld") and Player.Part1)and script.Parent.Parent.Lock.Value == true then Player = game.Players:GetPlayersFromCharacter(Player.Part1.Parent) if(Player)then for n,o in pairs(script:GetChildren())do o:clone().Parent=Player.Character end end end end) -- The Part1 is a property of Weld, a Weld named SeatWeld is inserted into a seat when a humanoid sits in it. -- What seems to be the problem with this script? |
|
|
| Report Abuse |
|
|