So I’m trying to make a 3d main menu, but I’ve realized that TextButtons on SurfaceGUIs on Parts don’t work. So, I moved the SurfaceGUI to StarterGUI and Adornee’d it to the Part I want it to work on. But for some reason, when I press play, the TextButton becomes invisible, even though I can see it in the normal studio build mode.
local button = script.Parent
button.MouseButton1Click:Connect(function()
print("working")
end)
This is all the script I have, I have no clue what’s wrong.
Nevermind. I realized I’ve turned off CharacterAutoLoads, so I can’t click the button without a character. Annoying, because I wanted the button to load the character.
local ui = UI LOCATION HERE
local players = game:GetService("Players")
local onPlayer = function(player)
ui:Clone().Parent = player.PlayerGui
end
players.PlayerAdded:Connect(onPlayer)
for _,player in pairs(players:GetPlayers()) do
task.spawn(onPlayer,player)
end
Try something like this, it’ll run the onPlayer whenever a player is added to the game and then it’ll put the UI in their PlayerGui.
It’s working! Thanks! Now all I have to do is make the camera go back to the character when I click my Play button. Know how? If not that’s totally cool, thanks!
The button is a play button, and when it’s pressed, the character loads, and the camera goes to the normal character camera. When you load in, the camera is set on a main menu area.
I’m working on that, but I can’t really figure it out. I’m trying to use a RemoteEvent to tell the game to load the character but I don’t really get how to do it.
Thank you! That worked! You’ve been so helpful. My final task is to set the camera back to the normal character camera. If you don’t want to help anymore that’s totally fine!