Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 5 years ago
Edited 5 years ago

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

0
You can find Seat in insert object School_Learners 13 — 5y
0
yes i know did you even read my question? radusavin366 617 — 5y
1
Functions for objects are normally called with colon, not with a period Rare_tendo 3000 — 5y
0
thank you so much that seems to do it! radusavin366 617 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Line 5:

popup.Sit(player.Character.Humanoid)

Fixed

player.Character.Humanoid.Sit = true
0
thanks for the answer although youre wrong, its been 8 days since i asked the question and the problem was solved radusavin366 617 — 5y
Ad

Answer this question