So lets says you have a menu and when you click the play button the player spawns.
well you could just have the player spawn, but teleport the player when the button is pressed
but i dont want it to be that way
Do you want a system where the player doesn’t spawn at all until you press/tap a button?
yea i want it to be that way .
Refer to THIS post to see about preventing the character from automatically spawning, then you just need to do
if script.Parent.MouseButton1Click then
#stuff here
end
I suggest you to use a connect function instead of if statements for detecting clicks:
script.Parent.MouseButton1Click:Connect(function)
--stuff/code
end)
The if statement would only allow it to function once, the first time you press the button, therefore it would be better to use a connect function.
Edit: I just tested it in studio to check if I was wrong and turns out, the if statement will not work, it simply executes the code without checking if the button was clicked. So yes it is better to use a connect function.
Sorry for saying so much on smth small.
Is there any way to load UI but not character on join, since I would like to use this for the first time a player joins and not just when they die.