Roblox Central

Discussion for all things Roblox. (roblox.com)

Welcome to the new forum! Any suggestions you have are greatly appreciated.
WARNING: Before referring anyone to this website, Please read this topic

    EquipItem()

    Share
    avatar
    iMathRandom
    Mod

    Posts : 66
    Join date : 2009-06-21
    Location : Ohio

    EquipItem()

    Post by iMathRandom on Sun Oct 11, 2009 2:35 pm

    I was going through xLEG0x's RPG and seen him using this function. Is that really a function?


    _________________
    w00t!, first siggy

    Jfeather
    Admin

    Posts : 232
    Join date : 2009-06-18
    Location : This Forum. Duh.

    Re: EquipItem()

    Post by Jfeather on Sun Oct 11, 2009 6:53 pm

    If he has earlier in the script the code

    Code:


    fuction EquipItem()

    --Codehere--

    end



    Then yes, it could be Wink


    _________________


    Remember to link your RC profile to your Roblox profile. You can do this in the "Information" section of your profile.
    To find someone's Roblox profile, it is located under their "Contact" tab on their RC profile.
    avatar
    Earth
    Admin

    Posts : 402
    Join date : 2009-06-18
    Location : According to my IP address: Topeka, Kansas.

    Re: EquipItem()

    Post by Earth on Sun Oct 11, 2009 7:10 pm

    Its probably an _G function Wink
    avatar
    iMathRandom
    Mod

    Posts : 66
    Join date : 2009-06-21
    Location : Ohio

    Re: EquipItem()

    Post by iMathRandom on Mon Oct 12, 2009 2:49 pm

    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


    _________________
    w00t!, first siggy
    avatar
    Earth
    Admin

    Posts : 402
    Join date : 2009-06-18
    Location : According to my IP address: Topeka, Kansas.

    Re: EquipItem()

    Post by Earth on Mon Oct 12, 2009 2:58 pm

    Yup. _G is finicky though.

    Sponsored content

    Re: EquipItem()

    Post by Sponsored content


      Current date/time is Mon Nov 12, 2018 4:12 pm