I was wondering on how to make this the text appear when I go to a certain location:
When I go to a area it will appear a text like a town name in the video shown, what would I use to make something like this?
I was wondering on how to make this the text appear when I go to a certain location:
If you want to achieve this then you need to split your map into chunks. You then check repeatedly if the player changes chunks. This is a cheap check to do but it depends on how you create the chunks. If your chunks are made with invisible parts then you should use raycasting to check your chunk.
When you have this system in place you can make a GUI to pop up when chunks change.
I would use tables with Region3 and info that defines the name and description of an area.
Here’s a template to start you off:
local RunService = game:GetService("RunService")--Get the 'RunService'
local Players = game:GetService("Players")--Get the 'Players' service
local Player = game.Players.LocalPlayer--Get the player with the 'Players' service
local Character = Player.Character--Get the player's character
local Root = Character:FindFirstChild("HumanoidRootPart")--Get the 'HumanoidRootPart' of the character
local areas = {
{"Area Name","Description",Region3.new(Vector3.new(0,0,0),Vector3.new(1,1,1))} --Vector3s need to be the start corner and the end corner
}
RunService.RenderStepped:Connect(function()
for i,v in pairs(areas) do
local area_name = v[1]
local description = v[2]
local Region = v[3]
local parts = workspace:FindPartsInRegion3(Region3,nil,100)
for t,y in pairs(parts) do
if y == Root then
--Make a ScreenGUI With 2 TextLabels pop-up and set one's text to 'area_name' and the other's to 'description'
end
end
end
end)
That’s really badly made it would be better to use observers such as “OnTouched” or modules such as ZonePlus by @ForeverHD. Using “RenderStepped” for the supplied solution and especially a for loop inside of RenderStepped can have some serious performance implications as it has to run pretty much before everything and before every frame. Furthermore, OP would need to add a debounce to ensure proper functionality. I strongly encourage OP to not use this solution.