Hi I want this script to invisible people when you sit in a seat. And when you not touch it uninvisibles you. Script:
script.Parent.Touched:Connect(function(plr)
if plr.Parent:FindFirstChild("Humanoid") then
for i, v in pairs(plr.Parent:GetChildren()) do
if v:IsA("BasePart") then
v.Transparency = 1
end
if v:IsA("Accessory") then
v.Handle.Transparency = 1
for index, value in pairs(v.Handle:GetDescendants()) do
if value:IsA("ParticleEmitter") then
value.Transparency = NumberSequence.new(1)
end
end
end
end
plr.Parent.Head.face.Transparency = 1
end
end)
script.Parent.TouchEnded:Connect(function(plr)
if plr.Parent:FindFirstChild("Humanoid") then
for i, v in pairs(plr.Parent:GetChildren()) do
if v:IsA("BasePart") then
v.Transparency = 0
end
if v:IsA("Accessory") then
v.Handle.Transparency = 0
for index, value in pairs(v.Handle:GetDescendants()) do
if value:IsA("ParticleEmitter") then
value.Transparency = NumberSequence.new(0)
end
end
end
end
plr.Parent.Head.face.Transparency = 0
plr.Parent.HumanoidRootPart.Transparency = 1
end
end)
What I have tried is changing basepart to Seat but it didn't work :(

2 comments
Do you mean that when players sit in it will invisible them and when they get out of the seat it visible them again?
yes! the script works in a part, but not a seat!