Hi i am creating a Space Sandbox game where you can become basically god and create universes, similar to universe sandbox 2. The problem is that i do not know alot of scripting but i see the freecam thing with shift + P. how can i make that but the players camera spawns in, in space. no character just the camera and mouse.
any solutions?
Delete the character of the player - from memory at least.
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(Player)
local Character = Player:WaitForChild("Character") or Player.CharacterAdded:Wait()
Character:Destroy()
end)
Forgive the indentations, DevForum indentations suck.
You don’t have to Delete the character, He can also set the CharacterAutoLoads to False and use Player:LoadCharacter() whenever he needs/wants to
but how do i make it so the player dosent have to press shift + P to enter? and that the camera spawns a specific place?
You would need to create a custom camera system. When you press Shift + P
, freecam mode turns on because you’re a developer of your game. Not every player can use this.
If you don’t know a lot about scripting, you should keep it as simple as possible. Making a camera script requires good math and scripting knowledge.
how do i create a camera script like that?
Ah! I knew there was something I missed, thanks for reminding me!
does anyone know how to create such a camera mode?
Manipulate workspace.Camera
.
You should try tinkering with the Freecam script inside your PlayerGui when you run the game. If you copy it and paste it in StarterGui, it should override the original. However you should incorperate it in a way that compiles with the rest of your scripts, the original tries to hide everything else. So, remove the parts where it:
- Hides all ScreenGuis
- Shows all ScreenGuis
- Toggle for freecam mode
And instead implement code to control it with your game scripts.