Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

When game loads, character break issue?

Asked by 5 years ago
Edited 5 years ago

So, basically my game uses a Morph Selection based on the characters Selected Gender value, and I have CharacterAutoLoads = false, which means the player won't spawn unless called Player:LoadCharacter()

My error for some reason, just started and I have no idea why, but I see my character model in workspace, and there's nothing inside, as in it's an empty player model.

In the output, it spams continuously:

"Player:Move called, but player currently has no humanoid"

This has recently started happening, but I've recently haven't touched or edited anything with any of the Player:connect() scripts, this is one of the weirdest bugs I've experienced so far xd

If anyone is having this issue, or had this issue before or could know the solution, please feel free to help

if this could be the issue, i dont know why it would start happening NOW and not before.

game.Players.PlayerAdded:Connect(function(PlayerSpawned)
PlayerSpawned:WaitForDataReady()
local Gender = PlayerSpawned:WaitForChild('Stats').SelectedGender.Value
if Gender ~= 'None' then
local Morph = Folder:WaitForChild(Gender).StarterCharacter
Morph:Clone().Parent = game.StarterPlayer
end
wait(.2)
PlayerSpawned:LoadCharacter()
wait(.3)
game.StarterPlayer.StarterCharacter:Remove()

I have a feeling it's where it removes the StarterCharacter from the StarterPlayer and isn't giving time for the player to spawn in the StarterCharacter and that I would need to increase the wait time from .3, to like 1

Here's a gif link of what my issue seems to look like:

https://gyazo.com/5bfdc7463d9b85cc2de8306d00285142

0
Getting this too. I'm sure it's a roblox error green271 635 — 5y
0
Well, im relieved that im not the only one and making myself seem like a sped scripter because of this xd Resplendid 3 — 5y
0
lemme try... greatneil80 2647 — 5y
0
well, it's supposedly just fixed for me so.. Resplendid 3 — 5y
View all comments (4 more)
0
If you want to save player data, use DataStoreService instead. Currently you are using data persistence, which is deprecated. User#19524 175 — 5y
0
And :Remove is deprecated as well, use :Destroy. User#19524 175 — 5y
0
@incapaz everytime i use DataStoreService, it never wants to work when I go from universe to universe, so im using deprecated ways for what works. Also, ik that but when I try Destroy it does nothing, and when I use Remove it works Resplendid 3 — 5y
0
Also, I am using a DataStore, that's not the data script.. thats just a script connecting the PlayerJoined, to set the player's morph in game.StarterPlayer Resplendid 3 — 5y

Answer this question