So I want to add boots to a player.
I saw this topic already: How do you add a part to a character?
And I tried doing what the guy said, but I still can’t do it.
Thank you for reading
So I want to add boots to a player.
I saw this topic already: How do you add a part to a character?
And I tried doing what the guy said, but I still can’t do it.
Thank you for reading
Do you want it to add the part when the player clicks a button or what?
I want it to be added when they join the game or respawn.
Okay so you wanna add a normal part to the player right? so insert a script into serverscriptservice and write this!
game.Players.PlayerAdded:Connect(function(player)
local character = player.Character or player.CharacterAdded:Wait()
local part = Instance.new("Part", character)
part.Name = "Part"
end)
Hope this helped!
Just to add, it’s not a good practice to use the Character parameter of Instance.new()
if it’s a custom part, which it most likely will be: PSA: Don't use Instance.new() with parent argument
If you already have the part stored somewhere, let’s just say handPart
in ServerStorage; you can do:
game.Players.PlayerAdded:Connect(function(plr)
local chr = plr.Character or plr.CharacterAdded:Wait()
local handPart = game.ServerStorage.handPart:Clone()
--Configure everything first, then parent it.
handPart.Parent = chr
end)
Not that what you’re currently doing is wrong, but I feel like it could be improved (this part is for the topic creator).
Oh okay thank you! (30 characters)
If you want it to stick with the player you can do this:
game.Players.PlayerAdded:Connect(function(player)
local character = player.Character or player.CharacterAdded:Wait()
local part = game.ReplicatedStorage.Part:Clone()
part.Parent = character
local Weld = Instance.new("Weld", part)
Weld.Name = "Weld"
Weld.Part0 = part
Weld.Part1 = character.Head
end)
Hope this helped!
This is what I want it for, I made a charge jump mechanic:
https://gyazo.com/09f1554fcca2c963540c59f2be18f94c
sorry i don’t really understand why do you need a part for that.
I want to make like Exo-Boots.