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: Has any one else experienced this problem (Custom Spawns)?

Previous Thread :: Next Thread 
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
25 Jan 2017 02:53 PM
So I have created my own custom spawn system. When the Player joins the game they view an intro, CharacterAutoLoads is set to false so after the intro I load the character. I set the primary part of the character to the characters uppertorso, and I use that to teleport the char to the spawn with CFrames. I have used the humanoid root part before as well still experience the same problem. // The problem // For some reason around 40% of the time the character is just dead on the spawn, with all of its joints broken. I have no lead to why this is happening, have found no errors in test mode or in output. I will #### #### bellow.
Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
25 Jan 2017 02:55 PM
_G.SpawnPad = 1

loadCharacter = function(Player)

-- Load the character into the game
Player:LoadCharacter()

-- Set character spawn location in lobby
game.Workspace:WaitForChild(Player.Name)

local Character = Player.Character
local UpperTorso = Character:WaitForChild("UpperTorso")
local SpawnPadCFrame = game.Workspace["SpawnPad" .. _G.SpawnPad].LightRing.CFrame

if _G.SpawnPad == 24 then
_G.SpawnPad = 1
else
_G.SpawnPad = _G.SpawnPad + 1
end

Character.PrimaryPart = Player.Character:WaitForChild("UpperTorso")

if _G.SpawnPad > 16 then
Character:SetPrimaryPartCFrame(CFrame.new(SpawnPadCFrame.X, SpawnPadCFrame.Y + 3, SpawnPadCFrame.Z)
* CFrame.Angles(0, math.rad(-270), 0))
else
Character:SetPrimaryPartCFrame(CFrame.new(SpawnPadCFrame.X, SpawnPadCFrame.Y + 3, SpawnPadCFrame.Z)
* CFrame.Angles(0, math.rad(-90), 0))
end

-- Make the joints used for symptom particles
createCharJoints(Character)

-- Slow down the characters speed
Character.Humanoid.WalkSpeed = 13

end
Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
25 Jan 2017 03:10 PM

Help would be greatly appreciated ;)
Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
25 Jan 2017 03:13 PM

I should also mention that I tested the createCharJoints() by removing it and the problem still occurs so I don't think it is that, "why I did not include the function in thread".
Report Abuse
LilMcManiac is not online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
25 Jan 2017 06:17 PM
Why not simply use,

Character:MoveTo(spawn position)
Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
25 Jan 2017 07:33 PM
CFrames are better in the sense that they aren't obstructed by the Roblox physics engine.

Do you think that could be killing the character though?
Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
25 Jan 2017 07:34 PM
use humanoid root part


Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
25 Jan 2017 07:35 PM

If you read my entire post I did try that and the problem still occurs...
Report Abuse
LilMcManiac is not online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
25 Jan 2017 07:37 PM
pretty positive that is what is killing the character.
Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
25 Jan 2017 07:37 PM
i did read lol, set the humanoidrootparts cframe, dont use primary part


Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
25 Jan 2017 07:41 PM
From my original posting.

"I have used the humanoid root part before as well still experience the same problem"
Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
25 Jan 2017 07:45 PM

If I use MoveTo() how should I rotate the character to my desired radian?
Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
25 Jan 2017 07:52 PM

Find it odd that CFrames work just fine with moving characters around elsewhere i use it, but for this case it kills the character?
Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
25 Jan 2017 08:14 PM
How do I rotate the character without CFrames though :)
Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
26 Jan 2017 12:06 PM

The bug is still occurring xd
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
26 Jan 2017 12:19 PM
Firt of all, stop using _G. i swear to god.


Secondly, Keep CharacterAutoLoads true or else you won't be seeing any guis.

--server script

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
if player.Team == game.Teams.Spectators then
wait()
char:Destroy()
end
end)
end)


Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
26 Jan 2017 12:41 PM

I don't want char auto loads to be true though. The system that I created relies on it being false. And I specifically created a system that clones guis from replicated storage and so on for intros.

Report Abuse
StrongNuclear is not online. StrongNuclear
Joined: 05 Mar 2016
Total Posts: 963
26 Jan 2017 12:51 PM
Am I not waiting long enough for something? I don't see anything wrong with my code... #### away _G. and I'm using humanoid Rootparts for teleportation now.
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