Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how to make the play button spawn the character?

I'm trying to make a menu where the player enters and his avatar is removed from the game and can only spawn only when he presses "play", how i can make this? i'm new on scripts

1 answer

set game.Players.CharacterAutoLoads to false and when the button is pressed ....

local player = game.Players.localplayer
player:LoadCharacter()

...or equivalent if not in LocalScript

12 comments

0

but if you set the autoload to false the guide will disappear, or?

0

Ah yeah... In mine I only wait for the spawn location to be set before loading the haracter so i didnt even realise it the GUI isnt there lol... Does the avatar have to be removed or an it just be spawned somewhere and teleported when he presses play?

0

my idea was for the player to enter and remove his default character (and keep the menu screen), select a morph and only after clicking "play" it will be generated within the map..

0

Ah I see... spawning the default character in a remote location to begin with could still work though, have the default RespawnLocation in some far away place then when a morph has been chosen set the respawnlocation to the place within the map, disable the morph selection GUI and and then loadcharacter ? :)

0

There probably is a way to do it the way you want to but im not aware of it sorry :/

0

its okay, thanks for the help bro

0

Why wouldn't the gui load in? Screen guis are children of the player, not the character.

0

StarterGui and PlayerGui are tied to the player’s character.... Going back to having autoload set to false, youu could just manually clone in the GUI when the player joins??

0

@DevilSpacy if the above comment doesn't help, maybe this will: https://developer.roblox.com/en-us/articles/Custom-Loading-Screens

0

Thx alex

0

@SteamGOD why when auto load is disabled the gui just don't load q-p

0

I am not really sure. add a Waiting area?

This discussion is preserved as it was. New answers, comments, and votes are closed.