#Disable hats in a camera mode

21 messages · Page 1 of 1 (latest)

red elbowBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

unique halo
#

my code is: script.Parent.Transparency = 1

if script.Parent:FindFirstChild("ConeHandleAdornment") then
script.Parent.ConeHandleAdornment:Destroy()
end

if script.Parent:FindFirstChild("CylinderHandleAdornment") then
script.Parent.CylinderHandleAdornment:Destroy()
end

script:Destroy()

red elbowBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

lament elbowBOT
#

studio** You are now Level 1! **studio

spark python
# unique halo my code is: script.Parent.Transparency = 1 if script.Parent:FindFirstChild("Con...
local table = {}
if [condition for being in car camera] then
for i, v in pairs(player.Character:GetChildren()) do
  if v:IsA("Accessory") then
    local handle = v:FindFirstChild("Handle")
    local att = handle:FindFirstChild("HairAttachment") or handle:FindFirstChild("HatAttachment") or handle:FindFirstChild("FaceCenterAttachment") or handle:FindFirstChild("FaceFrontAttachment")
    if att then
      for b,d in pairs(v:GetDescendants()) do
          if d:IsA("BasePart") then
             table.insert(table,d)
             d.Transparency = 1
          end
      end
    end
end

sorry wrote this quick and havent tested it but it should check for all head accessories and make them transparent

red elbowBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

unique halo
#

Ah thanks so much man ill go test it out

red elbowBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

unique halo
#

it doesnt work, i exactly pasted it in and the camera even became visible when i pasted it

red elbowBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

unique halo
#

if u need i could exactly tell u the name of the cam in explorer and where it is etc etc

red elbowBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

spark python
red elbowBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

unique halo
red elbowBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

unique halo
#

or idk what we talking about at the moment since i have little experience in scripting

red elbowBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

spark python
#

ok i just worked on it in studio and this script seemed to work

print("Hello world!")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
wait(3)

local tabl = {}
print("poggers")
for i, v in pairs(char:GetChildren()) do -- Get all children of the players character
    print(v)
    if v:IsA("Accessory") then -- Test if they are an accessory item
        print(v.Name.." Is an accessory")
        local handle = v:FindFirstChild("Handle") or v:FindFirstChild("handle") -- Find the item that should hold the attachment
        local att = handle:FindFirstChild("HairAttachment") or handle:FindFirstChild("HatAttachment") or handle:FindFirstChild("FaceCenterAttachment") or handle:FindFirstChild("FaceFrontAttachment")
        if att then -- If an attachment designed for the head is found it makes the item transparent
            for b,d in pairs(v:GetDescendants()) do
                if d:IsA("BasePart") then
                    table.insert(tabl,d)
                    d.Transparency = 1
                end
            end
        end
    end
end
#

from local tabl = {} onwards you should be able to copy paste that in as long as the player is identified

#

the beginning is just to start off a local script with the required objects