How can I refrence things from a local script in my gui?
local Text = script.Parent
local tweenservice = game:GetService("TweenService")
local detector = game.Workspace.Button.ClickDetector <---- the issue
local tsinfo = TweenInfo.new(
2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false
)
local tween = tweenservice:Create(Text, tsinfo, {TextTransparency = 1})
if not game:IsLoaded() then
game.Loaded:Wait()
end
wait(8)
tween:Play()
tween.Completed:Connect(function()
Text.Visible = false
Text.TextTransparency = 0
end)
detector.MouseClick:Connect(function()
tween:Play()
Text.Text = "Objective: Find the exit"
end)