Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to change part transparency from seats being used?

this is strange but i am trying to make it so when you sit on a seat named "Seat" it changes the transparency in a part named "Block" is set to 0.5

Seat.ChildAdded:connect(function(child)
	if game.Workspace.Seat.child.Name == "SeatWeld" then
		game.Workspace.Block.Transparency = 0.5
	end
end)

1 answer

✓ Accepted answer

game.Workspace.Seat is the seat, but Seat.child doesn't exist. The child that was added (the Weld) is the variable child

Also, connect should be Connect

local Seat = workspace.Seat
local Block = workspace.Block

Seat.ChildAdded:Connect(function(child)
    if child.Name == "SeatWeld" then
        Block.Transparency = 0.5
    end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.