Hi! Im wondering how you can make a script that can check the local humanoid if he is seated. And after that, I want to have another line that prints "hi it worked" only if the local player is seated. I'm not gone dislike and comments unless it's just trolling. Any ideas are helpful for me so please feel free to at least try to find a solution. Thank you so much.
Humanoid is a object placed in every character model. Your character model is in workspace, where all the world objects appear.
-- this is a script to access it: function humanoid(param) if param:IsA("Model") and param.Humanoid then return param end end hum = workspace.ChildAdded:Connect(humanoid)
Player is the client. You use this instance when you simply want to do things on the client side like how your character is on the server.
localp = game.Players:GetPropertyChangedSignal("LocalPlayer"):Wait() gui = localp.PlayerGui.ScreenGui.Frame -- your gui goes there ^ -- now if hum.Sit and hum:GetState() == 13 then gui.Visible = false else gui.Visible = true end
That is the script... Now you may want to do this too, but your choice.
hum:GetPropertyChangedSignal("Sit"):Connect(function(change) if change then gui.Visible = false else gui.Visible = true end end)