Part won't show when i sit on the seat

when i sit on the seat the table (part) is suppose to be visible but its not doing that for some reason.
script:

local part = script.Parent
local part2 = game.Workspace.table1

part.Touched:Connect(function(hit) 
	local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) if player then
		part2.Transparency = 0
	end
end)

a video that might help understand:
robloxapp-20201003-2112194.wmv (1.6 MB)

photo of explorer to help more:

If I’m right you just have to change the transparency value to 1 rather than 0. I’m not that much of a scripter so I’m not sure.

Instead of using a touched event, why not use humanoid.seated.

local player = game.Players.localplayer
repeat wait() until player.Character
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")
 
function onSeated(isSeated)  -- Code runs when function is fired
	if isSeated then
		print("I'm sitting")
	else
		print("I'm not sitting")
	end
end
humanoid.Seated:Connect(onSeated)  -- humanoid is sitting, fires function

the table (part) still is see through (transparency = 1) i need it to be non see through (transparency = 0)

this should be a little more of an example of whats happening

You have to put the code inside of a local script in StarterCharacterScripts. I had just tested my code out, and it works fine.

what do you mean by that? like a different script inside of the startcharacterscripts or what?

can you make a little video on how to do it?
or give me a video link on how to do something like that?

You create a local script in StarterCharacterScripts and put the code inside.

im still confused it still doesn’t work

Thats because “local player” in local player = game.Players.localplayer should be capitalized to
local player = game.Players.LocalPlayer
I’d rather you figure this out yourself then having me spoon feed you.