End underlined?

On line 14 my end is underlined but when I remove it, it makes the next end go underlined and the last and have an underlined bracket, how can I fix it?

Player = game.Players.LocalPlayer
repeat wait() until Player.Character
Character = Player.Character
mouse = Player:GetMouse()

Enabled = true

game:GetService("UserInputService").InputBegan:connect(function(inputObject,gameProcessedEvent)
	if gameProcessedEvent == true then return end
	
	if inputObject.Keycode == Enum.KeyCode.Q then
		if Enabled == true then
			script.Function:FireServer("Flaming Kick", Character.HumanoidRootPart.Cframe*CFrame.new(0,0,-3).p
			end
		end
	end
end)

The ‘p’ is outside, that’s your problem. Just put a bracket after the p on line 13

Player = game.Players.LocalPlayer
repeat wait() until Player.Character
Character = Player.Character
mouse = Player:GetMouse()

Enabled = true

game:GetService("UserInputService").InputBegan:connect(function(inputObject,gameProcessedEvent)
	if gameProcessedEvent == true then return end
	
	if inputObject.Keycode == Enum.KeyCode.Q then
		if Enabled == true then
			script.Function:FireServer("Flaming Kick", Character.HumanoidRootPart.Cframe*CFrame.new(0,0,-3).p)
		end
	end
end)

That solved it, thanks a lot!

Character Limit

1 Like

Make sure to mark it as solution :+1: :slight_smile:

There’s a few other optimisation stuff I recommend, for example, doing

Player.Character or Player.CharacterAdded:Wait()

instead of that repeat wait() loop

Also, == isn’t required on Booleans (as they can only be either true or false)
So I would recommend writing as such

if gameProcessedEvent then return end
if Enabled then