Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Shop scrolling system not working help?

Asked by 10 days 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 1669 — 10d
0
becuase i want to natonator63 17 — 10d

Answer this question