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

Shop scrolling system not working help?

Asked by 5 years ago

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 and oof ~= false 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

oof =false

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)
0
why do you have a cam variable then proceed to use game.Workspace.CurrentCamera in every instance theking48989987 2147 — 5y
0
becuase i want to natonator63 29 — 5y

Answer this question