Script showing error, how do i fix this?

At the bottom it shows the red underline for the error, what do i need to fix?

local par = script.Parent
local remote = par.RemoteEvent

remote.OnServerEvent:Connect(function(player, info)
	if info == "s1" then
		print("chocolate syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce1.Transparency = 0.35
			Pancakes.Name = "Chocolate Syrup Pancakes"
			print("Chocolate Syrup placed on Pancakes!")
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr			
	elseif info == "s2" then
		print("Maple syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce2.Transparency = 0.35
				Pancakes.Name = "Maple Syrup Pancakes"
				print("Maple Syrup placed on Pancakes!")
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr				
	elseif info == "s3" then
		print("Buttermilk syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce3.Transparency = 0.35
					Pancakes.Name = "Buttermilk Syrup Pancakes"
					print("Buttermilk Syrup placed on Pancakes!")
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr					
	elseif info == "s4" then
		print("Strawberry syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce4.Transparency = 0.35
						Pancakes.Name = "Strawberry Syrup Pancakes"
						print("Strawberry Syrup placed on Pancakes!")
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr					
	elseif info == "s5" then
		print("Vanilla syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce5.Transparency = 0.35
							Pancakes.Name = "Vanilla Syrup Pancakes"
							print("Vanilla Syrup placed on Pancakes!")				
							
	end
end)
1 Like

Use the </> option to paste the actual script. Far to lazy to type all that out.

2 Likes

My bad!

local par = script.Parent
local remote = par.RemoteEvent

remote.OnServerEvent:Connect(function(player, info)
	if info == "s1" then
		print("chocolate syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce1.Transparency = 0.35
			Pancakes.Name = "Chocolate Syrup Pancakes"
			print("Chocolate Syrup placed on Pancakes!")
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr			
	elseif info == "s2" then
		print("Maple syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce2.Transparency = 0.35
				Pancakes.Name = "Maple Syrup Pancakes"
				print("Maple Syrup placed on Pancakes!")
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr				
	elseif info == "s3" then
		print("Buttermilk syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce3.Transparency = 0.35
					Pancakes.Name = "Buttermilk Syrup Pancakes"
					print("Buttermilk Syrup placed on Pancakes!")
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr					
	elseif info == "s4" then
		print("Strawberry syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce4.Transparency = 0.35
						Pancakes.Name = "Strawberry Syrup Pancakes"
						print("Strawberry Syrup placed on Pancakes!")
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr					
	elseif info == "s5" then
		print("Vanilla syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce5.Transparency = 0.35
							Pancakes.Name = "Vanilla Syrup Pancakes"
							print("Vanilla Syrup placed on Pancakes!")				
							
	end
end)

What is wrong here … is it showing the script is errored in the editor?
Looks like you’re missing an “end”

if that is it …

local par = script.Parent
local remote = par.RemoteEvent

remote.OnServerEvent:Connect(function(player, info)
    if info == "s1" then
        print("chocolate syrup triggered")
        local Character = player.Character
        local Pancakes = Character["Plain Pancakes"]
        print(Character)

        if Pancakes.Name == "Plain Pancakes" then
            Pancakes.Sauce1.Transparency = 0.35
            Pancakes.Name = "Chocolate Syrup Pancakes"
            print("Chocolate Syrup placed on Pancakes!")
        end
    elseif info == "s2" then
        print("Maple syrup triggered")
        local Character = player.Character
        local Pancakes = Character["Plain Pancakes"]
        print(Character)

        if Pancakes.Name == "Plain Pancakes" then
            Pancakes.Sauce2.Transparency = 0.35
            Pancakes.Name = "Maple Syrup Pancakes"
            print("Maple Syrup placed on Pancakes!")
        end
    elseif info == "s3" then
        print("Buttermilk syrup triggered")
        local Character = player.Character
        local Pancakes = Character["Plain Pancakes"]
        print(Character)

        if Pancakes.Name == "Plain Pancakes" then
            Pancakes.Sauce3.Transparency = 0.35
            Pancakes.Name = "Buttermilk Syrup Pancakes"
            print("Buttermilk Syrup placed on Pancakes!")
        end
    elseif info == "s4" then
        print("Strawberry syrup triggered")
        local Character = player.Character
        local Pancakes = Character["Plain Pancakes"]
        print(Character)

        if Pancakes.Name == "Plain Pancakes" then
            Pancakes.Sauce4.Transparency = 0.35
            Pancakes.Name = "Strawberry Syrup Pancakes"
            print("Strawberry Syrup placed on Pancakes!")
        end
    elseif info == "s5" then
        print("Vanilla syrup triggered")
        local Character = player.Character
        local Pancakes = Character["Plain Pancakes"]
        print(Character)

        if Pancakes.Name == "Plain Pancakes" then
            Pancakes.Sauce5.Transparency = 0.35
            Pancakes.Name = "Vanilla Syrup Pancakes"
            print("Vanilla Syrup placed on Pancakes!")
        end
    end
end)

image
even if i add another end its showing the same

1 Like

Right before the 1st … - dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr

1 Like

You were missing quite a few ends

local par = script.Parent
local remote = par.RemoteEvent

remote.OnServerEvent:Connect(function(player, info)
	if info == "s1" then
		print("chocolate syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce1.Transparency = 0.35
			Pancakes.Name = "Chocolate Syrup Pancakes"
			print("Chocolate Syrup placed on Pancakes!")
        end
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr			
	elseif info == "s2" then
		print("Maple syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce2.Transparency = 0.35
			Pancakes.Name = "Maple Syrup Pancakes"
			print("Maple Syrup placed on Pancakes!")
        end
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr				
	elseif info == "s3" then
		print("Buttermilk syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce3.Transparency = 0.35
			Pancakes.Name = "Buttermilk Syrup Pancakes"
			print("Buttermilk Syrup placed on Pancakes!")
        end
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr					
	elseif info == "s4" then
		print("Strawberry syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce4.Transparency = 0.35
			Pancakes.Name = "Strawberry Syrup Pancakes"
			print("Strawberry Syrup placed on Pancakes!")
        end
-- dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr					
	elseif info == "s5" then
		print("Vanilla syrup triggered")
		local Character = player.Character
		local Pancakes = Character["Plain Pancakes"]
		print(Character)

		if Pancakes.Name == "Plain Pancakes" then
			Pancakes.Sauce5.Transparency = 0.35
			Pancakes.Name = "Vanilla Syrup Pancakes"
			print("Vanilla Syrup placed on Pancakes!")		
        end							
	end
end)
1 Like

Thank you so much! My script is fixed now!

Thank you so much! My script is fixed now!!

1 Like

This is the same script I just posted … - a few dividerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr’s

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.