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 6 years ago
Edited 6 years ago

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

1--module:
2 
3actions["seat"].Sit.func = function(player, popup)
4    if not popup.Occupant then
5        popup.Sit(player.Character.Humanoid)
6    end
7end
1--localscript:
2 
3local player = game.Players.LocalPlayer
4 
5button.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 — 6y
0
yes i know did you even read my question? radusavin366 617 — 6y
1
Functions for objects are normally called with colon, not with a period Rare_tendo 3000 — 6y
0
thank you so much that seems to do it! radusavin366 617 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Line 5:

1popup.Sit(player.Character.Humanoid)

Fixed

1player.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 — 6y
Ad

Answer this question