I tried to make a button when they purchase it will go down then go up again however it is not going down but the upward part of the script is working please help me
The Head is the button for the tycoon
Don't Mind the functions just the tween
local cost = tbl[1]
local item = tbl[2]
local stats = tbl[3]
stats.Value = stats.Value - cost
local PurchaseItems = Objects[item.Object.Value]
local purchasenotification = game.ReplicatedStorage.RemoteEvents.PurchaseNotification
local ButtonGoalone = {}
ButtonGoalone.Position = item:FindFirstChild("Head").Position - Vector3.new(0,-0.27,0) -- here
local ButtonGoaltwo = {}
ButtonGoalone.Position = item:FindFirstChild("Head").Position + Vector3.new(0,0.27,0)
local tweeninfo = TweenInfo.new(
1,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
0,
false,
1.5
)
local tween1 = tweenservice:Create(item:FindFirstChild("Head"),tweeninfo,ButtonGoalone) -- here
local tween2 = tweenservice:Create(item:FindFirstChild("Head"),tweeninfo,ButtonGoaltwo)
tween1:Play()
wait(1.5)
item.Head.Color = Color3.fromRGB(43, 168, 51)
tween2:Play()
wait(1.5)
PurchaseItems.Parent = script.Parent.PurchasedObjects
purchasenotification:FireClient(player,Objects[item.Object.Value].Name)

2 comments
Oops I didn't specify the head it the button for the tycoon
Is your button Welded?