#Disable hats in a camera mode
21 messages · Page 1 of 1 (latest)
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()
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.
** You are now Level 1! **
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
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.
Ah thanks so much man ill go test it out
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.
it doesnt work, i exactly pasted it in and the camera even became visible when i pasted it
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.
if u need i could exactly tell u the name of the cam in explorer and where it is etc etc
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.
The initial if statement is just a placeholder for whatever is mean to signify that the camera has been changed to be in the car. If you run a function when they are in the car you should be able to just copy paste the inside into that function and ignore the initial if
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.
i did delete the "[condition for being in car camera] " but it still didnt work
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.
or idk what we talking about at the moment since i have little experience in scripting
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.
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