Hey there, new scripter here,
The script works fine but i get an error causing it to not work as intended,
Error = Players.Aozwel.PlayerGui.MainDialogs.Stage2.StatusBar.Frame.TextLabel.LocalScri:47: 'end' expected (to close 'if' at line 15) near ''
Code =
-- STAGE 2
local dialogGui = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local object = script.Parent
local host = workspace.Host
local guiObject = script.Parent
local myThread = coroutine.running()
function continueDialog()
coroutine.resume(myThread)
end
host.Touched:Connect(continueDialog)
workspace.host.Touched:Connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
guiObject.Visible = true
-- Require module
local TypeWriter = require(ReplicatedStorage:WaitForChild("TypeWriter"))
coroutine.yield()
wait(1)
TypeWriter.typeWrite(script.Parent, "Head on over to the Potion Class!")
wait(1)
TypeWriter.typeWrite(script.Parent, "Hello there students my name is Professor Herbert")
wait(1)
TypeWriter.typeWrite(script.Parent, "Would you like to help me create my newest Potion?")
wait(1)
TypeWriter.typeWrite(script.Parent, "Great! I’ll need the following ingredients..")
wait(1)
TypeWriter.typeWrite(script.Parent, "They should all be hidden somewhere within the classes go look!")
wait(1)
object.AnchorPoint = Vector2.new(0, 0)
object.Position = UDim2.new{0, 0},{0, 0}
object:TweenPosition(UDim2.new(0, 0, -10.04, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine,0.5)
wait(2)
script.parent.Visible = false
if script.parent.visible == false then print("Worked!")
end
Thanks,

1 comment
After line 47 put an end). You didn't close the function body with the end keyword. The parenthesis is there to close of the :Connect() call.