of     1   

drgn42
#44919456Friday, April 01, 2011 1:21 PM GMT

output: Workspace.Part.PelletScript:13: 'end' expected (to close 'function' as line 1) near elseif function onTouched(hit) if hit.Name == "water" then print("water hit") i = math.random(1,7) if i == 1 then script.Parent.creator.Value.leaderstats.Money.Value = script.Parent.creator.Value.leaderstats.Money.Value + 10 script.Parent:remove() end elseif i == 2 then script.Parent.creator.Value.leaderstats.Money.Value = script.Parent.creator.Value.leaderstats.Money.Value + 5 script.Parent:remove() end elseif i == 3 then script.Parent.creator.Value.leaderstats.Money.Value = script.Parent.creator.Value.leaderstats.Money.Value + 15 script.Parent:remove() end if i == 4 then script.Parent.creator.Value.leaderstats.Money.Value = script.Parent.creator.Value.leaderstats.Money.Value + 20 script.Parent:remove() end script.Parent:remove() else print("no water") script.Parent:remove() end end script.Parent.Touched:connect(onTouched)
goldfriend10
#44919943Friday, April 01, 2011 1:47 PM GMT

theres needs two more ends at the final of script before script.Parent.Touched:connect(onTouched)
UFAIL2
#44922645Friday, April 01, 2011 3:27 PM GMT

Not enough ends. You need an end for every if do and function.

    of     1