My scripts are not working

I don’t know what is happening in my game, it was still working now and started to bug, I have a SpawnLocation (enabled) that was for the player to be born on top of it, but it is born on top of the ocean and falls into the void, video:

https://streamable.com/fcpa3x

I also have a script when the character is added, it moves the character to a folder, before it worked, but it stopped suddenly, here is the code:

-->> Modules <<--

local _S = require(workspace.Services)

-->> Variables <<--

local characters = workspace.Characters

-->> Functions <<--

_S.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		character.Parent = characters
	end)
end)

I only have 2 scripts that I wrote myself, and they are located in ServerScriptService

And sorry for my english, I’m using google translator

The character needs to be parented to workspace I believe, if you parent it into a different place, the client controller disconnects and causes the character to spawn in a different location.

1 Like

You could just also do character.HumanoidRootPart.Position = workspace.Map.SpawnLocation.Position + Vector3.new(0, 3, 0)

2 Likes

I deleted the script that puts the character in the folder and went to test the game, at first it worked, but I tried again and it continues to fall into the void.

Do you have you’re console open?
Try checking if there’s any errors in there.

Also, i think that the reason you’re character is spawning below the ground is because the spawn point is too flat, and as there’s another block below it near the void it makes you spawn there.

1 Like

I put a wait () in my code and it worked