Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Shop Scrolling System Working Improperly.Help?

Asked by 5 years ago
Edited 5 years ago

so, it scrolls to the first Item but doe'sent scroll to the second. here is my script:

 local ts = game:GetService("TweenService")

local cam = game.Workspace.CurrentCamera

local oof = true

script.Parent.MouseButton1Click:Connect(function()

if game.Workspace.CurrentCamera.CFrame == game.Workspace.BluePart.Position then

script.Parent.Parent["Buy thing"].Text = "Buy Crystal For 1,000,000 Poo"

local ti = TweenInfo.new(2,Enum.EasingStyle.Quint,Enum.EasingDirection.Out)

local tablething = {CFrame = game.Workspace.RedPart.CFrame}

local tween = ts:Create(cam,ti,tablething)

tween:Play()

end

end)

script.Parent.MouseButton1Click:Connect(function()

if game.Workspace.CurrentCamera.CFrame == game.Workspace.GreenPart.Position then


script.Parent.Parent["Buy thing"].Text = "Buy Crystal For 25,000 Poo"

local ti = TweenInfo.new(2,Enum.EasingStyle.Quint,Enum.EasingDirection.Out)

local tablething = {CFrame = game.Workspace.BluePart.CFrame}

local tween = ts:Create(cam,ti,tablething)

tween:Play()

oof =false

end

end)

Answer this question