Vector problems again

So, I’m trying to make it so that if one bed already has somebody in it, it sets the position of the player to the next bed, but it auto sets me to the third bed instead. I know the code is messy, I’ll work on it eventually.

[lua]if RagDoll:GetPos(v.TelePos) then RagDoll.Bed1Used = true end[/lua]
RagDoll:GetPos(v.TelePos) - That’s not right at all, assuming you want to compare their position against telepos. Should be
[lua]if RagDoll:GetPos()==v.TelePos then RagDoll.Bed1Used = true end[/lua]

It is a bit of a mess and I don’t think just changing that will fix it all, but it’s 1 thing that’s definitely needed.

When using that, it simply sets my position to the second set of beds. Still doesn’t fix the problem where if there’s already a player using it, then set the position somewhere else.


Use with tolarance set to 10 or 25 or something.

[lua]if RagDoll:GetPos():IsEqualTol(v.TelePos,10) then RagDoll.Bed1Used = true end[/lua]
Something like this?

Bump again, I cri everitim

Don’t bump every two hours.

Yes, something like that. I can’t tell you more because I have no idea what any of those variables are.