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

Help me " Line 21 'then' expected near '=' "?

Asked by 3 years ago
local uni = game.Workspace:FindChild"Devs"

local playerInventory = game.ReplicatedStorage:FindChild("Inventory")

local uniAmount = playerInventory.Unicorns

local player = game.Players.LocalPlayer

local throwPartyBtn = game.StarterGui.PartyGui.ThrowPartyButton

local throwParty = throwPartyBtn.CallOver --CallOver is a remote event btw



uniAmount = 1000

tradablePet = 1 --Boolean logic, here



if uniAmount = 1000

repeat

playerInventory.Instance.new(uni)

new(uni).tradablePet = 1

until uniAmount = 64794763839



if uniAmount = <1000

player:Kick ("Error with the auto farm.")



throwPartyBtn.MouseButton1Click:Connect(function()

uniAmount = 0

wait(1)

uniAmount = 999 --we want to chill the servers a bit here

wait(1)

new(uni).tradablePet = 0

wait(1)

new(uni).tradablePet = 1

throwParty = false

throwParty = (uni) --something to confuse the rStorage and configure it the way want it to

Help me " Line 21 'then' expected near '=' "

0
There are multiple errors, you're missing double equals signs for if statements (==) and there's no then, you also haven't put in any ends. This whole script is a mess. JesseSong 3916 — 3y

1 answer

Log in to vote
1
Answered by
ben0h555 417 Moderation Voter
3 years ago

I-uh. Quick pro tip you need to learn lua from the ground up, but basically you arent formating if statements propperly, it goes in a if then end format, and the equal operator is == not =.

Because of the lack of commenting and indenting I dont know where the if statements are supposed to end, so I have to guess but heres an example:

local uni = game.Workspace:FindChild("Devs")

local playerInventory = game.ReplicatedStorage:FindChild("Inventory")

local uniAmount = playerInventory.Unicorns

local player = game.Players.LocalPlayer

local throwPartyBtn = game.StarterGui.PartyGui.ThrowPartyButton

local throwParty = throwPartyBtn.CallOver --CallOver is a remote event btw



uniAmount = 1000

tradablePet = 1 --Boolean logic, here



if uniAmount == 1000 then

    repeat

        playerInventory.Instance.new(uni)

        new(uni).tradablePet = 1

    until uniAmount = 64794763839
end


if uniAmount <1000 then

    player:Kick ("Error with the auto farm.")
end



throwPartyBtn.MouseButton1Click:Connect(function()

uniAmount = 0

wait(1)

uniAmount = 999 --we want to chill the servers a bit here

wait(1)

new(uni).tradablePet = 0

wait(1)

new(uni).tradablePet = 1

throwParty = false

throwParty = (uni) --something to confuse the rStorage and configure it the way want it to

0
Is :FindChild a function?? User#32819 0 — 3y
0
Is :FindChild a function?? Waskiii1234 -5 — 3y
0
If there's no result on the developer hub or roblox studio, then it's not a function! There's no such thing as :FindChild JesseSong 3916 — 3y
Ad

Answer this question