I’m making a menu for my game, but i don’t want other players to see the character in the menu (its a fighting game, i dont want them to kill nor see players in a menu)
What im doing for now is teleporting the character to a part thats far from the map, but there are issues, First off, Other players will see that player for a split second since i cant really make the game teleport a character right when they spawn/go to menu (the menu value thingy is client-sided, so the server cant detect if a character is in a menu or not) So what i tried was setting the CharacterAutoLoads to off, but the menu GUI just doesnt appear, and i dont wanna have to manually respawn the character, i just want so they wont spawn just this once. Second off, you’ll still see the character since there are multiple maps, therefore the position wont be the same, so you might see them in the sky or something.
any help?
I’ve had a history with CharacterAutoLoads, I ended up just putting the player model into ServerStorage until said sequence was done.
i.e
local player = game.Players.LocalPlayer
local character = player.Character
character.Parent = game.ServerStorage
local function clickPlay()
--(ui.Visible = false or something)
character.Parent = workspace
end
clickPlay()
Probably not the most efficient but still could work!
(P.S. MAKE IT LOCAL!)
It didnt work, the character was only in server storage for the player, everyone else could see the player physically. (yes, i know local only happens for the player, im just saying what happened)
Using RemoteEvents you could use a serversided script. Just a bit harder! But for an easier way: Set the spawn location to a far-off point, then whenever the player clicks on the play button or something, then they get teleported to the area.
EDIT: Read the post again, didn’t see that you did that and people could see the floating player. I honestly am unsure of what you can do. Sorry!
Sadly, setting spawn locations to a different spot is unavailable for me.
All maps have spawn locations, so i dont have to manually place the character everytime they die (everyone has infinite respawns)
What i did was so when you spawn in, it fires a remote event to the server, does some checks, and the server places you in server storage, this works great, but for a few seconds while the other player is still on the default loading screen, their character is in the map. Plus, im not sure if using remote events is a great way, i feel like it might lag a bit if too many players join at the same time.
What i did was so when you spawn in, it fires a remote event to the server, does some checks, and the server places you in server storage, this works great, but for a few seconds while the other player is still on the default loading screen, their character is in the map.
You could fix this by just making this work on the server side instead of firing a remote. PlayerAdded and CharacterAdded are the two events you’d need.
The reason why im using a remote event in the first place, is because the BoolValue that shows if the player is in the menu or not, is client-sided, there are certain timed things with changing that value, so making it on the server would be pretty annoying.