You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Spawn character when gui button is clicked -
What is the issue? Include screenshots / videos if possible!
The player doesnt spawn when gui button is clicked it only makes the camera custom -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I only found this scripts here but they didnt work as I wanted to
This for the server
game.Players.CharacterAutoLoads = false
game.Players.PlayerAdded:Connect(function(Player)
Player:LoadCharacter()
repeat wait() until Player.Character:FindFirstChild("Humanoid") -- Loaded Character Humanoid
Player.Character.Parent = game.ServerStorage -- Store It
end)
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(Player)
repeat wait() until game.ServerStorage:FindFirstChild(Player.Character.Name)
game.ServerStorage:FindFirstChild(Player.Character.Name).Parent = game.Workspace
print("LoadedCharacter")
end)
This for the client
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
local PlayButton = script.Parent.Play
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.CameraPart.CFrame
PlayButton.MouseButton1Click:Connect(function()
Camera.CameraType = Enum.CameraType.Custom
PlayButton:Destroy()
game.ReplicatedStorage.RemoteEvent:FireServer()
end)
Heres a video too of whats the problem