Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

" Expected identifier when parsing expression, got ')' "?

Okay, I have been working on a Entry Point/Notiorety-like game for a few weeks now, and I have found a ton of errors. I was able to fix them BUT the error i'm talking about couldn't get easily fixed. Here's the main script where I got the error. (Script)

	if game.Players:GetPlayerFromCharacter(hit.Parent) then
		game.ReplicatedStorage.GameEV:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
end)

The Script Error is located at the ')' from 'end)', and I do not know what should I do. There's the rest of coding i've worked on.

(LocalScript)

local brick = game.Workspace.Part1
local bricke = game.Workspace.Part2

game.ReplicatedStorage.GameEV.OnClientEvent:Connect(function()
	game.StarterGui.Mission.Frame.BackgroundTransparency = 0.2
	game.StarterGui.Tutorial.Frame.BackgroundTransparency = 0.25
	game.StarterGui.Mission.TextLabel.BackgroundTransparency = 1
	game.StarterGui.Tutorial.TextLabel.BackgroundTransparency = 1
	game.StarterGui.Mission.TextLabel.Text = ""
	game.StarterGui.Tutorial.TextLabel.Text = ""
	game.StarterGui.Tutorial.TextLabel.TextColor3 = Color3.new(255,0,0)
	wait(3)
	game.StarterGui.Tutorial.TextLabel.Text = "???: Uh... Hello?"
	wait(3)
	game.StarterGui.Tutorial.TextLabel.Text = "???: Oh, you are there."
	wait(3)
	game.StarterGui.Tutorial.TextLabel.Text = "???: I am the Commander of the organization also known as Titillium. You can call me Crypto for now."
	wait(7)
	game.StarterGui.Tutorial.TextLabel.Text = "Crypto: I know about you, you are a criminal that have assaulted a jewelry a few days ago."
	wait(7)
	game.StarterGui.Tutorial.TextLabel.Text = "Crypto: You might be useful for Titillium, so we decided to hire you. Do you accept?"
	wait(6)
	game.StarterGui.Tutorial.TextLabel.TextColor3 = Color3.new(255, 255, 255)
	game.StarterGui.Tutorial.TextLabel.Text = "You: Well, the payment is mad according to what I investigated..."
	wait(5)
	game.StarterGui.Tutorial.TextLabel.TextColor3 = Color3.new(255,0,0)
	game.StarterGui.Tutorial.TextLabel.Text = "Crypto: Do you mean you are up to it?"
	wait(4)
	game.StarterGui.Tutorial.TextLabel.TextColor3 = Color3.new(255, 255, 255)
	game.StarterGui.Tutorial.TextLabel.Text = "You: What do you think? It is time to put hands in movement."
	wait(5)
	game.StarterGui.Tutorial.TextLabel.TextColor3 = Color3.new(255,0,0)
	game.StarterGui.Tutorial.TextLabel.Text = "Crypto: Okay, I have localized the prison you are in right now. I also have sent instructions to your phone."
	wait(7)
	game.StarterGui.Tutorial.TextLabel.Text = ""
	game.StarterGui.Mission.TextLabel.Text = "Mission: Deactivate the door (Click the Power Box)"
	wait(1)
	game.StarterGui.Tutorial.TextLabel.Text = "Crypto: See the Power Box next to the bed? Deactivate it."
	wait(8)
	game.StarterGui.Tutorial.TextLabel.Text = ""
	brick.Position = Vector3.new(129.597, -7.914, -43.585)
	bricke.Position = Vector3.new(129.597, -7.914, -43.585)
end)

(Script)

local brick = game.Workspace.Part2
local bricko = game.Workspace.Part1

game.ReplicatedStorage.GameEV.OnServerEvent:Connect(function()
	bricko.Position = Vector3.new(137.34, 0.574, -45.933)
end)

I've got a RemoteEvent in ReplicatedStorage, which is called 'GameEV'.

I hope I get help and, if i failed terribly wrong, it is because I literally got no projects but this one.

1 answer

✓ Accepted answer

Add an end after line two in the first bit of code you posted.

2 comments

0

LeedleLeeRocket, I get the same error, but in the 'end)' i've just added.

0

You need an end, no parentheses, to close the if statement. The end) with the parentheses is used to close the entire function, you only need one of them.

This discussion is preserved as it was. New answers, comments, and votes are closed.