Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 09:22 PM |
I've been stuck on this for a very long time, and I could use all the help I can get. This is supposed to morph players at the start of each round, and is part of a bigger script, but for some reason, it disconnects some of the players, with no warning. Why? And could you please help me fix this?
local char = game.ServerStorage:WaitForChild("Characters") local Chars = char:GetChildren() print("Found") function Morph() wait () print ("Started") for i, player in ipairs(game.Players:GetChildren()) do local New = Chars[math.random(1, #Chars)] local Taken = New:WaitForChild("IsTaken") if Taken.Value == true then print("This char is taken!") elseif Taken.Value == false then Taken.Value = true New.Parent = game.Workspace New:MakeJoints() local CharCam = script.Camera:Clone() CharCam.Parent = player.PlayerGui local CharName = script.Value:Clone() CharName.Value = New.Name CharName.Parent = CharCam player:LoadCharacter() wait (1) player.Character:Destroy() player.Character = New end end end Morph()
u sicko! |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 09:31 PM |
There's also nothing in output, just "Player 3 leaving" and so on.
u sicko! |
|
|
| Report Abuse |
|
|
Astrain1
|
  |
| Joined: 27 Mar 2013 |
| Total Posts: 18697 |
|
|
| 06 Jun 2015 09:37 PM |
'player:LoadCharacter() wait (1) player.Character:Destroy() player.Character = New'
What does this do?
jeb get me the seperatrons | that doesn't stop the fact that your house will no longer resemble a house |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 09:42 PM |
Oh wow, that comment helped some. I don't think I should have put that there. This is where that came from: wiki.roblox.com/index.php?title=LoadCharacter
u sicko! |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 09:43 PM |
Unfortunately even without that line it still disconnects the players :(
u sicko! |
|
|
| Report Abuse |
|
|
iikegan
|
  |
| Joined: 14 Apr 2012 |
| Total Posts: 48 |
|
|
| 06 Jun 2015 09:45 PM |
| Just a dumb question... Why do you say "u sicko!" at the end of all your replies? |
|
|
| Report Abuse |
|
|
Astrain1
|
  |
| Joined: 27 Mar 2013 |
| Total Posts: 18697 |
|
|
| 06 Jun 2015 09:46 PM |
'Just a dumb question... Why do you say "u sicko!" at the end of all your replies?'
it's a 'siggy'
it's there so you can recognize who he is :)
i have it too
jeb get me the seperatrons | that doesn't stop the fact that your house will no longer resemble a house |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 09:57 PM |
It's just my siggy, thanks for explaining it for me Astrain. I've made some edits to the script and it still disconnects players, for seemingly no apparent reason.
local char = game.ServerStorage:WaitForChild("Characters") local Chars = char:GetChildren() print("Found") function Morph() wait () print ("Started") for i, player in ipairs(game.Players:GetChildren()) do local New = Chars[math.random(1, #Chars)] local Taken = New:WaitForChild("IsTaken") if Taken.Value == true then print("This char is taken!") elseif Taken.Value == false then Taken.Value = true New.Parent = game.Workspace New:MakeJoints() local CharCam = script.Camera:Clone() CharCam.Parent = player.PlayerGui local CharName = script.Value:Clone() CharName.Value = New.Name CharName.Parent = CharCam wait() player.Character = New end end end wait() Morph()
u sicko! |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 10:05 PM |
Wellp, it looks like I'm gonna be stuck on this even longer.
u sicko! |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 10:18 PM |
AHA! Found this in the disconnected player's output, anyone know what it means?
PlayerList: GetRankInGroup failed because Player not in Workspace PlayerListScript2: getAdminIcon() failed because Player not in Workspace PlayerList: GetRankInGroup failed because Player not in Workspace PlayerListScript2: getAdminIcon() failed because Player not in Workspace
u sicko! |
|
|
| Report Abuse |
|
|
iikegan
|
  |
| Joined: 14 Apr 2012 |
| Total Posts: 48 |
|
|
| 06 Jun 2015 10:22 PM |
Ive seen that before....
HerpDerp (✿´‿`) |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 10:25 PM |
Ok, I'm pretty sure this part is causing it: elseif Taken.Value == false then Taken.Value = true local Selected = New:Clone() Selected.Parent = game.Workspace Selected:MakeJoints() local CharCam = script.Camera:Clone() CharCam.Parent = player.PlayerGui local CharName = script.Value:Clone() CharName.Value = Selected.Name CharName.Parent = CharCam player.Character = Selected
I think that at some point the player is removed from workspace, but where?
u sicko! |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 10:33 PM |
Hmm, does this help?
22:32:33.976 - Image failed to load: rbxassetid://79749577: Failed to resolve texture format 22:32:34.032 - Content failed for http://c7.roblox.com/c52092aa7e8b080c64377c9767465d1c because invalid request 3 22:32:34.033 - Content failed because invalid request 3 22:32:34.034 - MeshContentProvider failed to process http://c7.roblox.com/c52092aa7e8b080c64377c9767465d1c because 'could not fetch' 22:32:35.650 - FMOD 36: An invalid object handle was used. 22:32:35.651 - Error while processing packet. 22:32:35.651 - Error while processing packet: FMOD 36: An invalid object handle was used. (packet id: 131, packet length: 32) 22:32:35.698 - httpGet &disconnect=true failed. Trying again. Error: &disconnect=true: Trust check failed, The operation completed successfully. . Elapsed time: 0
u sicko! |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 10:40 PM |
Ugh :( I just really want to solve this problem, I've been stuck doing this for a whole week.
u sicko! |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 10:53 PM |
Well now the sub-forum's dead so I'll try again tomorrow. One last bump though!
u sicko! |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 06 Jun 2015 11:15 PM |
I've been looking around the wiki a bit and have modified my script, but it still DISCONNECTS THE PLAYERS FOR NO REASON! PLEASE HELP ME!
local char = game.ServerStorage:WaitForChild("Characters") local Chars = char:GetChildren() print("Found") wait () print ("Started") function Morph() for i, player in ipairs(game.Players:GetChildren()) do local New = Chars[math.random(1, #Chars)] local Taken = New:WaitForChild("IsTaken") if Taken.Value == true then print("This char is taken!") Morph() elseif Taken.Value == false then Taken.Value = true local Selected = New:Clone() Selected.Parent = game.Workspace Selected:MakeJoints() local CharCam = script.Camera:Clone() CharCam.Parent = player.PlayerGui local CharName = script.Value:Clone() CharName.Value = Selected.Name CharName.Parent = CharCam player:ClearCharacterAppearance() player.Character = Selected end end end Morph()
u sicko! |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 07 Jun 2015 12:30 AM |
| if you had a model i could use and test this script on, id be more than happy to help debug this |
|
|
| Report Abuse |
|
|