script.Parent.MouseButton1Click:Connect(function() local tweenService = game:GetService("TweenService") local Properties = { Position = Vector3.new(-15.5, 1, 42.5) } local tweenInfo = TweenInfo.new(2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut) local tween = tweenService:Create(game.Workspace.MoneyGiver,tweenInfo,Properties) tween:Play() wait(3.5) local tweenService = game:GetService("TweenService") local Properties = { Position = Vector3.new(-15.5, -17, 42.5) } local tweenInfo = TweenInfo.new(2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut) local tween = tweenService:Create(game.Workspace.MoneyGiver,tweenInfo,Properties) tween:Play() end)
I want it so that you click a surfacegui, no clickdetector, and theres a cooldown before the next script.
Just add a simple wait()
local debounce = true script.Parent.MouseButton1Click:Connect(function() if debounce = true then debounce = false local tweenService = game:GetService("TweenService") local Properties = { Position = Vector3.new(-15.5, 1, 42.5) } local tweenInfo = TweenInfo.new(2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut) local tween = tweenService:Create(game.Workspace.MoneyGiver,tweenInfo,Properties) tween:Play() wait(3.5) debounce = true end end)