Hello, I have been trying to make a gui so when you put a players name A model of them will appear, if anyone could help that would be great.
You can just clone the character of the player:
There are 2 ways to do this; Option 1: Where every player can see the model. Option 2: Just you can see the model, the first option I will do now:
Option 1 - Local Script (TextBoxI)
local textbox = script.Parent -- Change to text box textbox:GetPropertyChangedSignal("Text"):Connect(function() -- Detect when a player writes into the field if textbot.Text == game.Players.LocalPlayer.Name then game.ReplicatedStorage.SpawnCharacter:FireServer() -- You need a remote event in replicated storage, name it SpawnCharacter end end)
Option 1 - Server Script (ServerScriptService
game.ReplicatedStorage.SpawnCharacter.OnServerEvent:Connect(function(player) if player.Character then - Checks to see if they have a character if game.Workspace:FindFirstChild("Model"..player.Name) then game.Workspace:FindFirstChild("Model"..player.Name) :Destroy() -- This prevents them from spawning multiple copies of themselves wait(0.1) local model = player.Character:Clone() model.Parent = game.Workspace model.Name = "Model "..player.Name model:SetPrimaryPartCFrame(player.Character.PrimaryPart.CFrame + Vector3.new(0,0,-15)) -- This will spawn the model in front of the player, you can adjust the offset of the position to change it, (x,y,z) else local model = player.Character:Clone() model.Parent = game.Workspace model.Name = "Model "..player.Name model:SetPrimaryPartCFrame(player.Character.PrimaryPart.CFrame + Vector3.new(0,0,-15)) -- This will spawn the model in front of the player, you can adjust the offset of the position to change it, (x,y,z) end end end)
Option 2 - Local Script (TextBox)
local textbox = script.Parent -- Change to text box local player = game.Players.LocalPlayer textbox:GetPropertyChangedSignal("Text"):Connect(function() -- Detect when a player writes into the field if textbot.Text == player.Name then if game.Workspace:FindFirstChild("Model"..player.Name) then game.Workspace:FindFirstChild("Model"..player.Name) :Destroy() -- This prevents them from spawning multiple copies of themselves wait(0.1) local model = player.Character:Clone() model.Parent = game.Workspace model.Name = "Model "..player.Name model:SetPrimaryPartCFrame(player.Character.PrimaryPart.CFrame + Vector3.new(0,0,-15)) -- This will spawn the model in front of the player, you can adjust the offset of the position to change it, (x,y,z) else local model = player.Character:Clone() model.Parent = game.Workspace model.Name = "Model "..player.Name model:SetPrimaryPartCFrame(player.Character.PrimaryPart.CFrame + Vector3.new(0,0,-15)) -- This will spawn the model in front of the player, you can adjust the offset of the position to change it, (x,y,z) end end end)
Please feel free to ask any questions, if I helped please accept this answer!
Get the text inside the text box, then search the workspace for their model. Make a clone of it, and parent it inside the ObjectWindow (can't remember what it is called). This should make your code work.