does anybody know how to make a claim house door, like where the door says “claim house”, and when you walk through the door it says “BaconHairFabFur’s House” and then ur able to sell your house if you don’t want it anymore
it’s kinda like something that the adopt and raise games have when you walk into a house door
btw in just a beginner so i don’t really know much about StringValue or region3 or something and i’m not talking about how to made a buyable house door
hopefully you probably understand what i’m trying to say in this topic
1 Like
I made one of those before. I wish I had more time to explain, but Alvin_Blox has a pre-made tutorial. You should watch it.
Adding to this, just linking the video here
i wasn’t talking about like how to make a buyable house
i was talking about how to make a claim house door that you can go into without paying for it
1 Like
Well, you’d need to use either an ObjectValue
or a StringValue
I’ll explain what a StringValue
is, since that could seem like the most simple to learn:
Now, how would you want to check if there’s a House already claimed? We’d need to use a Touched
Event for this Instance to detect the different values, so let’s do this:
local Part = script.Parent
local ClaimedUser = script.Parent.StringValue
Part.Touched:Connect(function(Hit)
local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
if Player and ClaimedUser.Value == nil then --We want to check if this is nil, or if the value is blank so that anyone is welcome to claim this the first time
ClaimedUser.Value = Player.Name --We want to make this a string, since it'll store a String Value
end
end)
4 Likes