Basically, the player has a house. Inside that house I have a folder called ‘Rooms’ and inside that parts named ‘01’, ‘02’, etc. These are sized to each room. And I want to basically be able to check what room the player is currently in when they press a button
for _, v in pairs(Page:GetChildren()) do
if v:IsA('ImageButton') then
v.Activated:Connect(function()
print('You are in room' .. currentRoom)
end)
end
end
However I am not sure how to go about this effectively? And if using Region3 would be compramised, as I’m doing this via client scripts, and the each players house has their own name, and I basically want to send the players current room to the server, so it changes that rooms floor/wall design
Try calling GetTouchingParts() on the part sized to the room. Check all of the parts that the command returns and if its a member of the player’s character then the player is in the room
I think it would be simpler to call GetTouchingParts on the part in the room instead of the character and then check if one of the player’s members is in the list