Lua script confusion

Viewed 29

So this is my script, for some reason its not working, it should deploy a tweenservice animation, move the click detector brick to somewhere else and then end then reposition it and end the click. Please someone help

local cooldown = workspace.cooldown
local base = game.StarterGui.ScreenGui.Base
local ClickDetect = workspace.click.ClickDetector
local hand = workspace.Holder
local tween = game:GetService("TweenService") --Animation Editing starts here
local info = TweenInfo.new(
    1,
    Enum.EasingStyle.Linear,
    Enum.EasingDirection.Out,
    0,
    false,
    0
)


local goals = {
    Transparency = 0
}

local play = tween:Create(cooldown, info, goals)
local playhandle = tween:Create(hand, info, goals)

--cooldown system
ClickDetect.MouseClick:Connect(function()
    workspace.click.Position = Vector3.new(211.66, 3.698, -279.285)
    play:Play()
    playhandle:Play()
    wait(2)
cooldown.SurfaceGui.TextLabel.Text = "5"
wait(1)
cooldown.SurfaceGui.TextLabel.Text = "4"
wait(1)
cooldown.SurfaceGui.TextLabel.Text = "3"
wait(1)
cooldown.SurfaceGui.TextLabel.Text = "2"
wait(1)
cooldown.SurfaceGui.TextLabel.Text = "1"
wait(1)
    cooldown.SurfaceGui.TextLabel.Text = "NO COOLDOWN"
    workspace.click.Position = Vector3.new(211.66, 3.698, -231.029) 
end)
0 Answers
Related