I am working on an Objective system for my horror game I am working on and after dozens of attempts, I can't seem to get it to work.
So the game starts off perfectly fine and working with it informing you on what is going on and what your goals are, and then you head off, so how it is supposed to work is when you exit the house it is supposed to activate an Ontouched script to change the objective to guide the player to walk to a building, but the Ontouched script won't work and the text wont change for some reason.
Objectiveblock1 is the block you touch when you exit the house, cancollide is false, anchored is true, transparency is 1, and I'm trying to compress the entire objective system into this one script too, but I don't know what is going wrong...
Here is the script, I would appreciate some help.
wait(8)
script.Parent.Text = ("Here is what is going on.")
wait(4)
script.Parent.Text = ("You just woke up")
wait(4)
script.Parent.Text = ("You had a very ominous dream, but you shrug it off.")
wait(5.5)
script.Parent.Text = ("And you cant wait to see your friends again!")
wait(5)
script.Parent.Text = ("So as you slowly woke up, you decided to head out.")
wait(4)
script.Parent.Text = ("Objective: Exit the house")
game.Workspace.Blocker1.Parent = game.ReplicatedStorage
function onTouched(part)
game.StarterGui.ScreenGui.Frame.TextButton.Text = ("Objective: ")
end
game.Workspace.Objectiveblock1.Touched:connect(onTouched)
Everything works until line 14.
Thank you in advance.

1 comment
It didnt do anything...