script.Parent.Occupant = ("humanoid") then
print("lamp")
end
I am making a script to make the game do something when the player sits down? I am trying to make it work but it wont. I put a seat in a model and inserted a seat.Please help!
script.Parent.Occupant = ("humanoid") then
print("lamp")
end
I am making a script to make the game do something when the player sits down? I am trying to make it work but it wont. I put a seat in a model and inserted a seat.Please help!
Please, visit this website before writing there a question. There you can find API-Reference, and it has an answer to your question, here. If you still not understand, there is an example:
workspace.Miniller.Humanoid.Seated:Connect(function(isSeated, seat)
if isSeated then -- player is sitting
print(seat.Name) -- printing the object name where the player is sitting.
end
end)
or you can use game.Players.Miniller (of course with your name) instead of workspace.Miniller. Both works
Dude, Use Seat.Occupant.
It kind of worked the website helped! thank! you!
Just use
if plr.Character.Humanoid.Sit == true then
--Stuff Here
end
NOTE: You have to define plr yourself
EX: If the player's name is "RobloxGamer69", plr could be
game.Players.RobloxGamer69
Hope this helps!
Though this works it’s a bit redundant. Use Seat.Occupent
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Please look up your issue before addressing this forum.
I did nothing helped