im making a jojo game and i need help im super new to lua and if you could help me figure it out i would be very happy
heres the script
local Arrow = script.Parent local Click = Arrow:WaitForChild("Click")
Click.MouseClick:Connect(function(player)
local Backpack = player:FindFirstChild("Backpack")
if Backpack then
local Stands = game:GetService("ServerStorage"):WaitForChild("Stands")
local PlrStats = player:WaitForChild("PlrStats")
local currentStand = PlrStats:WaitForChild("Stand")
if PlrStats.Stand.Value ~= "stand1" then
--Give Stand3
if Backpack:FindFirstChild("Stand1") or Backpack:FindFirstChild("Stand2") or Backpack:FindFirstChild("Stand3") then
local prevStand = workspace:FindFirstChild(player.Name.." Stand")
local prev = Backpack:FindFirstChild("Stand1") or Backpack:FindFirstChild("Stand2") or Backpack:FindFirstChild("Stand3")
prevStand:Destroy()
prev:Destroy()
local Stand = Stands:FindFirstChild("Stand3"):Clone()
Stand.Parent = Backpack
currentStand.Value = "Stand3"
else
local Stand = Stands:FindFirstChild("Stand3"):Clone()
Stand.Parent = Backpack
currentStand.Value = "Stand3"
end

2 comments
Can you explain what you're trying to do with the script?
im trying to make if i have stand1 i get stand3 if i click it