SpawnLocation spawnYoffset / force spawn

SpawnLocations can be a bit annoying sometimes, as they try to put the character on top of any intersecting parts or terrain. However, I wouldn’t like this to happen on certain occasions, as it may be inside a building and characters spawn on top of the roof instead of inside a room.

I’d like the players to spawn on these…

SpawnYOffset (Number value) - determines how far away from the top of the spawn the player spawns. E.g., if it was set to 10, the player would spawn 10 studs away from the top surface of the part.

ForceSpawnHere (Bool value, I don’t really know what to call this!) - if it is set to false, the player will spawn on top of any intersecting parts or terrain, if it is set to true they will spawn on top of the spawn NO MATTER what, even if it means that they spawn inside bricks or terrain.

Is there anyway you could send me that particular model? I was looking into a spawning bug a while ago that involved spawning on top of rotated parts but this fix hasn’t went live yet. It may fix this or I may look into it more.

I don’t think a fix for this will come quickly as it’s a complicated issue. I highly recommend you create a ‘custom spawning system’.

In case someone is unsure of how to do this:
[ul]
[li]Turn off CharacterAutoLoads[/li]
[li]Connect to Player.PlayerAdded server-side, and call :LoadCharacter on every player who joins[/li]
[li]Connect a function to the Humanoid’s Died event; when it dies wait a second or two and call :LoadCharacter on the player again. Reconnect this function to the Died event of the new character’s Humanoid (i.e. infinite connection loop)[/li]
[li]Whenever you call :LoadCharacter, run this code:[/li]

Character.PrimaryPart = Character:WaitForChild('Torso') Character:SetPrimaryPartCFrame(<cframe a little above your spawn point)

Couldn’t you could just CFrame the torso on spawn to the spawnlocation.

aww but that requires work!!

aww but that requires work!![/quote]

+Requires you to know how to script, and unfortunately most of ROBLOX’s population doesn’t. I’ve had showcase builders frequently complain when they try to spawn a character somewhere and then it spawns on the roof.

I just turned on something that should fix this. Let me know if there is still an issue.

aww but that requires work!![/quote]

+Requires you to know how to script, and unfortunately most of ROBLOX’s population doesn’t. I’ve had showcase builders frequently complain when they try to spawn a character somewhere and then it spawns on the roof.[/quote]

Requires a free 3 lines of code in a localscript in StarterGui.

wait(3) Spawn=workspace.SpawnLocation game.Players.LocalPlayer.Character.Torso.CFrame=Spawn.CFrame+Vector3.new(0,3+Spawn.Size.y/2,0)

Works :smiley:

1 Like

The problem with CFraming is characters spawning inside each other and getting flung

1 Like

I was just trying to help :frowning:

1 Like

Sorry :frowning:

You were replying to me so I thought you were posting that as an excuse for why there was no need for the feature for non-scripters.

1 Like

[quote] Sorry :frowning:

You were replying to me so I thought you were posting that as an excuse for why there was no need for the feature for non-scripters. [/quote]

I would love it to be in but due to the process it’d take longer than anyone would want to wait.

1 Like