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

[SOLVED]"The function Sit is not a member of "Humanoid"" error?

For some reason, I can't get the player's humanoid sit in a chair:

--module:

actions["seat"].Sit.func = function(player, popup)
	if not popup.Occupant then
		popup.Sit(player.Character.Humanoid)
	end
end
--localscript:

local player = game.Players.LocalPlayer

button.MouseButton1Click:Connect(function() v.func(player, closest) end) -- closest is a seat instance

Note: func() works, if i put a print statement inside of it and call it, it prints accordingly. Just for some reason, in the modulescript, when .Sit is called it thinks im calling it from a humanoid, when popup is a seat instance

4 comments

0

You can find Seat in insert object

0

yes i know did you even read my question?

1

Functions for objects are normally called with colon, not with a period

0

thank you so much that seems to do it!

1 answer

Line 5:

popup.Sit(player.Character.Humanoid)

Fixed

player.Character.Humanoid.Sit = true

1 comment

0

thanks for the answer although youre wrong, its been 8 days since i asked the question and the problem was solved

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