I was going through xLEG0x's RPG and seen him using this function. Is that really a function?
3 posters
EquipItem()
Jfeather- Admin
- Posts : 232
Join date : 2009-06-18
Location : This Forum. Duh.
- Post n°2
Re: EquipItem()
If he has earlier in the script the code
Then yes, it could be
- Code:
fuction EquipItem()
--Codehere--
end
Then yes, it could be
Earth- Admin
- Posts : 402
Join date : 2009-06-18
Location : According to my IP address: Topeka, Kansas.
- Post n°3
Re: EquipItem()
Its probably an _G function
iMathRandom- Mod
- Posts : 66
Join date : 2009-06-21
Location : Ohio
- Post n°4
Re: EquipItem()
Found it;
_G.equipItem = function(hn)
local p = hn.Parent.Parent
local v = hn.Parent.Hand.Value
local a = hn
if v then a = p["Right Arm"] else a = p["Left Arm"] end
local w = Instance.new("Weld")
if v then w.Name = "rightgrip" else w.Name = "leftgrip" end
w.Parent, w.Part0 = a, a
w.C0 = CFrame.new(0, -1, 0)
w.Part1 = hn
return w
end
_G.equipItem = function(hn)
local p = hn.Parent.Parent
local v = hn.Parent.Hand.Value
local a = hn
if v then a = p["Right Arm"] else a = p["Left Arm"] end
local w = Instance.new("Weld")
if v then w.Name = "rightgrip" else w.Name = "leftgrip" end
w.Parent, w.Part0 = a, a
w.C0 = CFrame.new(0, -1, 0)
w.Part1 = hn
return w
end
Earth- Admin
- Posts : 402
Join date : 2009-06-18
Location : According to my IP address: Topeka, Kansas.
- Post n°5
Re: EquipItem()
Yup. _G is finicky though.
|
|