#whenever i sell i want it to say like "here you go 2323$" - example value
1 messages · Page 1 of 1 (latest)
can someone dm me and hlep me
its only 65 lines
sorry it wont let me send the actually script
The string and getting total seems to be fine. You aren't getting any actual errors?
If you aren't then the issue may be further in your system, and you should add a lot of temporary print() to locate the issue.
So the script works it's just the text not properly displaying? Can you show me what it is showing on the textlabel?
I am guessing this isn't your system.. This is overriding the message you are trying to send
i literally said it was that
😭
its just when i tried to make it as " " or rewrite or overwrite i should say it doesnt work
string.format("You earned $%d from your fish!", total)
try that instead
I've had issues with rich text due to not formatting string maybe for some reason it is the same for your system
So if you just put "Hello" instead of doing "text" .. total .. "text" it works? Or does it not work at all?
Odd.. Sorry to ask the same thing but you've actually tested that?
If so I'd have to see the code where you are deciding what text to display
Okay I see your goal
Okay assuming the choices table is an array table..
You need to do firstTimeTree.Choices[1].Response.Text = "New message here" instead of doing DialogueText.NpcText()
okay hold on im creating a playerdata saver
@opal tree
'
what is this
^
i forgot
like what is it called
a single quote?
i cant figure out what your trying to help em with
it still says the same text
did you implement my fix? let me see your code
where would i implement it
** You are now Level 6! **
just to make sure
Replace code in ss with
firstTimeTree.Choices[1].Response.Text = "New Message"
is NpcText the function that makes text visible?
** You are now Level 6! **
If so the string you put in the parameter is useless for some reason and you need to instead of removing the code just put what I provided above the existing code
like this?
if so it still shows "test"
and this the other way
^^
@opal tree
The problem is I don't know how your system works
It seems to just take the Text variable of the specific choice
My code changes that so it should work as long as it is done before the message is loaded/displayed
why is the firstTimeTree variable underlined you need to make sure all the variables are proper I am doing it off my mind so yk
okasy
hold on
Id = "start",
Text = "Hey there I'm Hook! Not to be confused with my brothers Line or Sinker... Anyways, what do ya need?",
Choices = {
{
Text = "Sell Inventory",
Command = function(player)
local Backpack = player:FindFirstChild("Backpack")
if not Backpack then return end
local total = 0
for _, item in ipairs(Backpack:GetChildren()) do
local valueObj = item:FindFirstChild("ItemValue")
if valueObj and valueObj:IsA("StringValue") then
local itemWorth = tonumber(valueObj.Value)
if itemWorth then
total += itemWorth
item:Destroy()
end
end
end
local stats = player:FindFirstChild("leaderstats")
if stats and stats:FindFirstChild("Coins") then
stats.Coins.Value += total
end
firstTimeTree.Choices[1].Response.Text = "You earned $" .. total .. " from your fish!"
end,
Response = {
Id = "sellresult",
Text = "test"
}
},
{
Text = "Fishing Inventory",
Response = {
Id = "inventory",
Text = "w.i.p"
}
},
{
Text = "Fish Value",
Response = {
Id = "value",
Text = "There's only one place right now, silly."
}
},
{
Text = "Nevermind",
Response = {
Id = "leave",
Text = "Goodbye!"
}
}
}
}
return function(player)
player:SetAttribute("TalkedTo_ShowCase", true)
return firstTimeTree
end
oh it sent
finally
is it not like this?
you need to write it out yourself instead of copy/pasting to be sure
still lined
but I mean I'm positive my code is right and changes the text, so put my code inside of the function as before (Must be before the text variable is used elsewhere) and then under it do print(firstTimeTree.Choices[1].Response.Text"
even if i write it
msg to lon g
still doesnt work tho 😭
can u write it by chance?
idk if im just writing it wrong
or wat
Okay i got on studio for this it works
It even auto detects it
The code you are showing me isn't the code that actually displays the text above the npc's head and that is the root of the issue if it is still not working with the code I provided
it is
I do not see you making any text labels or anything visible wym it is
well theres mulitple script
but this customizes what the npc is asying
whenever u interact with it
All I know is the code I sent you will change the value of the Text variable, if it isn't working it is due to a different part of your system
Your og issue was some function you didn't show not properly displaying text, so whatever that function was doing isn't working right either, it should be doing the same thing as the code I provided to properly work
do u want to see the diologuehandler or dialoguetext or state or visual
idk which one is the cause of the issue lol you need to add print statements all up in your system to find out why it won't change
hm
i cant just show u all the scripts?
ima be honest bro at this point just give chat gpt ur entire system and tell it ur issue and to find the cause of the issue
Personally I am not about to learn your entire script system, the fix should've been as easy as what I provided you before