Ok, so I want to make a game similar to games like What’s The Word and Copyrighted Artist and other GUI only games. What would be the best way to remove the play, I’ve tried removing the humanoid, but I was wondering if there was a better solution.
*ServerScript
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
Character:Destroy()
end
end
On the client, wait until the Character is removed then make a function for what ever.
1 Like
You can go to Players
, and set CharacterAutoLoads
to false:
After doing this, you would have to use a server script and clone each UI manually to the PlayerGui
, because the UI replicates after the character spawns:
game:GetService("Players").PlayerAdded:Connect(function(player) -- Fires when a player joins the game
local PlayerGui = player:WaitForChild("PlayerGui") -- Get's the PlayerGui
for _, GUI in ipairs(game:GetService("StarterGui"):GetChildren()) do -- Get's the components of the StarterGui
GUI:Clone().Parent = PlayerGui -- Clones the UI and sets the parent to the players PlayerGui
end
end)
2 Likes