Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

This Script ddoesnt wrok for some reason and im bad at titles?

local cooldown = false

script.Parent.Actived:Connect(function()
	if cooldown == function then
	    cooldown = true
	game.Workspace.MainEvent.AddFish:FireServer()
	script.Parent.Enabled = false
	wait(1)
	script.Parent.Enabled = true
	cooldown = false
	end
end)

This is my simulator script, its supposed to add fish but instead it gives me this error, Players.fshduia.Backpack.Harpoon.AddFish2:4: Expected '(' when parsing function, got 'then'

2 comments

0

Updated my post. Apparently you misspelled Activated.

0

You Spelt Activated As Actived

1 answer

✓ Accepted answer

You are attempting to compare cooldown to a function open call. What you need to do is compare if cooldown is false.

Example:

local cooldown = false

script.Parent.Activated:Connect(function()
if cooldown == false then
cooldown = true
game.Workspace.MainEvent.AddFish:FireServer()
script.Parent.Enabled = false
wait(1)
script.Parent.Enabled = true
cooldown = false
end
end)

2 comments

0

No, still doesnt work?

0

error is now 09:24:11.012 - Actived is not a valid member of Tool

This discussion is preserved as it was. New answers, comments, and votes are closed.