Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make an armor?

Asked by 10 years ago

For example: In Space Knights you automatically wear the armor, and in crystal raiders also, how do I make that? also, any roblox wiki article or youtube tutorial will help me a lot.

3 answers

Log in to vote
1
Answered by 10 years ago

You can use welds via scripting to attach blocks to a player's torso.

Here's the wiki article to welds.

Here's a simple and straightforward tutorial on welds.

Ad
Log in to vote
1
Answered by
drahsid5 250 Moderation Voter
10 years ago

try something like:

char = script.Parent --put this in  the player
local player = game.Players:GetPlayerFromCharacter(char)
pants = player.PlayerGui.Score.Armor.LowerArmor.Value
if pants >= 1 then
color = game.Lighting.ArmorColor[pants]
color1 = color.Color1.Value
color2 = color.Color2.Value
---- 
mod = Instance.new("Model") 
mod.Parent = char
mod.Name = "Pants" 
wait() 
---- 
rleg3 = Instance.new("Part") 
rleg3.formFactor = 3
rleg3.Size = Vector3.new(1.05, 1.7, 1.05) 
rleg3.BrickColor = BrickColor.new(color1) 
rleg3.Name = "RightLeg1" 
rleg3.Reflectance = 0
rleg3.TopSurface = 0 
rleg3.CanCollide = false 
rleg3.Parent = mod 
rleg3.BottomSurface = 0 
rlegw3 = Instance.new("Weld") 
rlegw3.Part0 = char["Right Leg"] 
rlegw3.Part1 = rleg3 
rlegw3.Parent = rleg3 
rlegw3.C0 = CFrame.new(0, 0.3, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0) 
---- 
rleg1 = Instance.new("Part") 
rleg1.formFactor = 3
rleg1.Size = Vector3.new(1.05, 1.7, 1.05) 
rleg1.BrickColor = BrickColor.new(color1) 
rleg1.Name = "LeftLeg1" 
rleg1.Reflectance = 0
rleg1.TopSurface = 0 
rleg1.CanCollide = false 
rleg1.Parent = mod 
rleg1.BottomSurface = 0 
rlegw1 = Instance.new("Weld") 
rlegw1.Part0 = char["Left Leg"] 
rlegw1.Part1 = rleg1 
rlegw1.Parent = rleg1 
rlegw1.C0 = CFrame.new(0, 0.3, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0) 
---- 
r1leg3 = Instance.new("Part") 
r1leg3.formFactor = 3
r1leg3.Size = Vector3.new(1.1, .1, 1.1) 
r1leg3.BrickColor = BrickColor.new(color2) 
r1leg3.Name = "RightLeg2" 
r1leg3.Reflectance = 0
r1leg3.TopSurface = 0 
r1leg3.CanCollide = false 
r1leg3.Parent = mod 
r1leg3.BottomSurface = 0 
r1legw3 = Instance.new("Weld") 
r1legw3.Part0 = char["Right Leg"] 
r1legw3.Part1 = r1leg3 
r1legw3.Parent = r1leg3 
r1legw3.C0 = CFrame.new(0, 0.3, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0) 
---- 
r1leg1 = Instance.new("Part") 
r1leg1.formFactor = 3
r1leg1.Size = Vector3.new(1.1, .1, 1.1) 
r1leg1.BrickColor = BrickColor.new(color2) 
r1leg1.Name = "LeftLeg2" 
r1leg1.Reflectance = 0
r1leg1.TopSurface = 0 
r1leg1.CanCollide = false 
r1leg1.Parent = mod 
r1leg1.BottomSurface = 0 
r1legw1 = Instance.new("Weld") 
r1legw1.Part0 = char["Left Leg"] 
r1legw1.Part1 = r1leg1 
r1legw1.Parent = r1leg1 
r1legw1.C0 = CFrame.new(0, 0.3, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0) 
---- 
r2leg3 = Instance.new("Part") 
r2leg3.formFactor = 3
r2leg3.Size = Vector3.new(1.1, .8, 1.1) 
r2leg3.BrickColor = BrickColor.new(color2) 
r2leg3.Name = "RightLeg3" 
r2leg3.Reflectance = 0
r2leg3.TopSurface = 0 
r2leg3.CanCollide = false 
r2leg3.Parent = mod 
r2leg3.BottomSurface = 0 
r2legw3 = Instance.new("Weld") 
r2legw3.Part0 = char["Right Leg"] 
r2legw3.Part1 = r2leg3 
r2legw3.Parent = r2leg3 
r2legw3.C0 = CFrame.new(0, -.7, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0) 
---- 
r2leg1 = Instance.new("Part") 
r2leg1.formFactor = 3
r2leg1.Size = Vector3.new(1.1, .8, 1.1) 
r2leg1.BrickColor = BrickColor.new(color2) 
r2leg1.Name = "LeftLeg3" 
r2leg1.Reflectance = 0
r2leg1.TopSurface = 0 
r2leg1.CanCollide = false 
r2leg1.Parent = mod 
r2leg1.BottomSurface = 0 
r2legw1 = Instance.new("Weld") 
r2legw1.Part0 = char["Left Leg"] 
r2legw1.Part1 = r2leg1 
r2legw1.Parent = r2leg1 
r2legw1.C0 = CFrame.new(0, -.7, 0)*CFrame.fromEulerAnglesXYZ(0, 0, 0) 
---- 
end
Log in to vote
1
Answered by 10 years ago

Then, make the armor find the local players humanoid. And increase its health and maxhealth by whatever u want it to be Example:

local Player = script.Parent.Parent
local humanoid = Player.Character.Humanoid --I think this is correct but it might not be
humanoid.Health = humanoid.Health + 20 --20 can be anything u want it to be
humanoid.MaxHealth = humanoid.MaxHealth + 20 --20 can be anything u want it to be

Answer this question