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
1 | Seat.ChildAdded:connect( function (child) |
2 | if game.Workspace.Seat.child.Name = = "SeatWeld" then |
3 | game.Workspace.Block.Transparency = 0.5 |
4 | end |
5 | end ) |
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
1 | local Seat = workspace.Seat |
2 | local Block = workspace.Block |
3 |
4 | Seat.ChildAdded:Connect( function (child) |
5 | if child.Name = = "SeatWeld" then |
6 | Block.Transparency = 0.5 |
7 | end |
8 | end ) |