#how to change the text in billboard UI with a script?
1 messages · Page 1 of 1 (latest)
i found a different way to do it, and its in one script
-- Table of city names (can be changed at any time)
local CityNames = {
Paris = "country",
Orleans = "america",
Orleans2 = "australia2"
}
-- Function to update the TextLabels for all cities
local function UpdateCityNames()
local parent = script.Parent
-- Paris
local Paris = parent:FindFirstChild("Paris")
if Paris and Paris:FindFirstChild("Attachment") and Paris.Attachment:FindFirstChild("BillboardGui") and Paris.Attachment.BillboardGui:FindFirstChild("TextLabel") then
Paris.Attachment.BillboardGui.TextLabel.Text = CityNames.Paris or "Paris"
end
-- Orleans
local Orleans = parent:FindFirstChild("Orleans")
if Orleans and Orleans:FindFirstChild("Attachment") and Orleans.Attachment:FindFirstChild("BillboardGui") and Orleans.Attachment.BillboardGui:FindFirstChild("TextLabel") then
Orleans.Attachment.BillboardGui.TextLabel.Text = CityNames.Orleans or "Orleans"
end
-- Orleans2
local Orleans2 = parent:FindFirstChild("Orleans 2")
if Orleans2 and Orleans2:FindFirstChild("Attachment") and Orleans2.Attachment:FindFirstChild("BillboardGui") and Orleans2.Attachment.BillboardGui:FindFirstChild("TextLabel") then
Orleans2.Attachment.BillboardGui.TextLabel.Text = CityNames.Orleans2 or "Orleans 2"
end
end
-- Call once on script run
UpdateCityNames()
-- Example: Change names at runtime
-- CityNames.Paris = "New Paris"
-- CityNames.Orleans = "New Orleans"
-- CityNames.Orleans2 = "New Orleans 2"
-- UpdateCityNames()
@craggy blade
do u need anything else?
yoo
thanks
ill test it rn
1 thing
i pressed f8 im bugged now idk what do i do
cant click
uh
** You are now Level 1! **
cant save
cant u close place
and if worst comes to worst, you cant just copy and paste it again
alr
tell me if it saved im actual curious
yeah ive done a lot since
so this is what one of the citys children look like?
gimmie like 15 - 40 mins and ill get back to u when ive added all of the cities
** You are now Level 4! **
will there be more cities added?
yeah im doing all of europe
no no no no
i dont think you get what i meant
?
<--- dumahh
let me show you
no no i suck at explaining
kk
nvm
its cos like i wanted a script so like i can paste it into a city and i customize the name fast instead of having to go to properties and stuff
but ngl i got used to it
already
but i still have a lot of questions
ill ping when i ask the question cos i kinda forgot
lol
oh ok
so this is what the city name children look like?
yea, thats one way of doing it but what cant you group all of the cities together and put a server script in the model? its so much quicker if u want to rename things
nah im new to this its too complicated
btw
im trying to make a rts game based of nations roleplay remastered but a little more complex
like war system instead of troops painting the map for you
and factories
** You are now Level 2! **
ur new to studio?
no like can u show me all of the children in "City"
yeah i have no experience
any experience at game development at all?
oh ok thx
nope but i used to make really good maps in fortnite
well thats something
its alright i dont need a script to name them its better to do it manually
like with the old command items or whatever like dance and it spawns guns
no, trust me its not
oh cool
its cos im gonna make all of europe
tbh if ur new to studio, you should probably like learn a bit of scripting and modeling
dont learn both forget what i just said
like yt tutorials?
yeah
oh ok
id reccomend, you learn something, then mess around with it for a day
so you reinforce ur learning
biggest mistake ive done
i wasted a whole year because of that
because theres this game on roblox with so much potental called nations roleplay remastered almost reaching 1k players yet it is VERY wonky and horribly made
thanks for the advice
yea, but good games take a lot of scripting and bugfixing, dont get me started on it
and the admins are very toxic and all they changed in a year was add 2 troops and change the ui
yeah for now im gonna make the map atleast
oh, well maybe they've moved on from the game
nah they updated yesterday
added missions
wanna join the roblox studio to see what i got so far
how often do they update?
alr
subzero44tb
idk i got back into the game 1 month ago but they prob saw the potention finally and are updating it more now they did a big halloween update
alr
i added u
oh, makes sense
added
u adding me?
yeah
ohhhh
so are there gonna be like little armies or smth
like this
basically like this but better:
wait ur listening to kanye west lol
i started watching yt but i was listening to my kanye west playlist for the last few hours
wait thas actual cool
** You are now Level 5! **
yuh
yeah thats the game im basing it out of that i was talking about earlier
thats rlly cool
thanks
so ur planning to add more of those little white things with the cities?
yeah
wait hol up lemme cook
alr
wts up
im making everything with small squares
ik
wt dat
these
yes the game i showed you uses that
** You are now Level 3! **
yeah it might have come from the custom sky i put
oh, i put them in the camera so now it looks like, that
alright tanks
alg
oh yuh i saw that
but i genually dont know what whent wrong
wdym by what went wrong?
oh ok
like im not using the 1x1 or 4x4 anymore
lol
i started stretching them thats not what i wanted i dont know what went wrong
wait but why do u want it like that?
but i had to cos the 1x1 nor 4x4 wouldnt fit like this
so its cleaner ngl but yeah
oh, fair
it dont matter but im gonna try doing that for the future countries
yea, try to keep it consistent for that.
alr, so im happy to help with the cities things, just tell me what i need to do
wts up?
how do i replace the cities with the circles the best way?
hm
i might have an idea
lemme try it on one to see if it works
but i will hop off for a bit cuz ive been on all day
after i try it
ok so my first way didnt work, ill figure something out while im off tho, gl and have fun
alr
oh its alright
thanks
im gonna consider doing the map from scratch
and only use these
no stretching
but tomorrow
rn im burnt out
ive been working on this all day
anyways ill update you in dms cys
cya
yk what
** You are now Level 4! **
at this point
might just re do
the cities too and use the circles that u wanted instead ngl
so i basically didnt do anything today other than find the europe map image in the background to base the map out of
but i learnt skill ig and now ik what to do
No keep them, I'll find a way around
yo are u awke
Yeas
@craggy blade i jus got on th game, i added a to-do list so u can put in ur stuff, i find it kinda helpful, u dont need to use it but still
Wait what time is it for u
** You are now Level 6! **
@vagrant cliff
Oh bru I was at school, do U wanna work on it over the weekends? Btw wts Ur time zone do we can find out a time to work on it together?
@craggy blade
its cst for me
. dam bro
oh yuh btw, wheres the other countries like australia and uh
others
@craggy blade want to do it over the weekends when we're both on?
i will do wordl map in the future
i got someone to help me scripting so now were 3
yeah
Oh great! That will help a lot