<eof> expected near 'end'

local ser = Instance.new(“RemoteEvent”,Workspace) end
local ile = game:GetService(“UserInputService”)
ile.InputBegan:Connect(function(input, gameProcessedEvent)
if input.UserInputType == Enum.UserInputType.MouseButton1 then ser:FireServer() end end)

My problem is that the code wont run, and i get an error saying “eof expected near ‘end’”. I have no idea how to fix it, even though i have watched several videos on how to fix it. Where in the code is the problem and how do i fix it?

You don’t need an end in Instance.new() line

local ser = Instance.new("RemoteEvent",workspace) --removed end here
local ile = game:GetService("UserInputService")

ile.InputBegan:Connect(function(input, gameProcessedEvent)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		ser:FireServer()
	end
end)

Thanks! My code now works.

khkhkhkyhykhk

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