So my problem is that it shows this error: Script Error: try\try.lua:6: ')' expected near "tried" when i launch my try resource.. Can anybody help me what to do? Here's the script:
function try(plr)
local chance = math.random(0,1)
if chance == 1 then
local playerName = getPlayerName
local actiontext = string.sub (text,3)
outputChatBox ( " .. getPlayerName .. " "tried" " .. actionText .. " "and it worked!" , root, 0, 255, 0, true )
else
local playerName = getPlayerName
local actiontext = string.sub (text,3)
outputChatBox ( " .. getPlayerName .. " "tried" " .. actionText .. " "and it didnt work!" , root, 255, 0, 0, true )
end
end