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

Can someone help me with the hat equip unequip gui system?

Asked by 4 years ago
Edited 4 years ago

so im mading a hat equip/unequip system(from gui) Here da script

but the hats keeping falling down. I need some help

local plr = game.Players.LocalPlayer
local char = plr.Character
local e = script.Parent


script.Parent.MouseButton1Click:Connect(function()
    local Rd = Instance.new("Hat")
    local Handle = Instance.new("Part")
    Handle.Name = "Handle"
    Rd.Name = "RainbowDominus"
    Handle.CanCollide = false
    Handle.Position = char:findFirstChild("Head").Position
    Handle.formFactor = 0
    Handle.Size = Vector3.new(1.045, 1.045, 1.045)
    Handle.BottomSurface = 0
    Handle.TopSurface = 0
    Handle.Locked = true
    Handle.Parent = Rd
    Handle.Color = Color3.new(0, 0, 0)
    game.Workspace.Mesh:Clone().Parent = Handle
    Rd.Parent = char
    Rd.AttachmentForward = Vector3.new(-0, -0, -1)
    Rd.AttachmentPos = Vector3.new(0, 0.5, -0.2)
    Rd.AttachmentRight = Vector3.new(1, 0, 0)
    Rd.AttachmentUp = Vector3.new(0, 1, 0)
    end)
0
Please format the code so it is easier to read. Use a Code Block instead of just pasting your code in straight from Roblox Studio. appxritixn 2235 — 4y
0
@oCrxptic I’m new here, so idk how to it btw thanks I edited it. ZerogameTVCh 17 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

i delete the end with ) now and add ) to another end

Ad

Answer this question