alright so a lot of things going on here but the issue im trying to solve at the moment is line 23 it doesnt bother changing the string value at all and just continues with the rest of the code
Script:
local textLabel = script.Parent.NPCText
local text = script.Parent.Words.Value
local length = string.len(text)
local Option1 = textLabel.Option1
local Option2 = textLabel.Option2
local stringvalue = "Sherman"
local player = textLabel.Parent.Parent.Parent
for stop = 1, length do
wait(0.1)
textLabel.Text = string.sub(text, 1, stop)
Option1.Visible = true
Option2.Visible = true
end
script.Parent.Words.Changed:Connect(function()
for no = 1, length do
wait(.1)
textLabel.Text = string.sub(text, 1, no)
end
end)
Option1.MouseButton1Click:Connect(function()
text = "Oh Brilliant! Please Hand Him Over!"
Option1.Visible = false
Option2.Visible = false
wait(2)
textLabel.Parent:Destroy()
end)
Option2.MouseButton1Click:Connect(function()
Option1.Visible = false
Option2.Visible = false
text = "Ah I See, Well Would You Please Search For Him For Me?"
game.ReplicatedStorage.QuestStatus:FireClient(player,stringvalue)
game.ServerStorage:FindFirstChild(player.Name.."'s Quests").FindEdgar.Value = 1
wait(3)
textLabel.Parent:Destroy()
end)
yes this is a server script inside a PlayerGui get over it

1 comment
thank you both for answering i always end up with the dumbest issues with the simplest answers