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

Expected Indintifier When Pass variable name got )??

Hello, So im having this issue when im trying to make an ability for a morph ive maded, Error: Expected Indintifier When Pass variable name got ), This happens in a server script.(Basically i fired a event from a local script to a server script.)

I will be grateful for every possible help!

(Im not a advanced scripter.)

Server Code:

local RS = game:GetService("ReplicatedStorage")
local Skull = RS:WaitForChild("SkullAbility")

Skull.OnServerEvent:Connect(function(player, Mouse)

	local Character = player.Character
	wait(0.9)
	local Fireball = Instance.new("Part")
	Fireball.Parent = workspace
	Fireball.CFrame = Character.HumanoidRootPart

	local Mesh = Instance.new("SpecialMesh")
	Mesh.Parent = Fireball
	Mesh.MeshId = "http://www.roblox.com/asset/?id=4770583"
	Mesh.TextureId = "http://www.roblox.com/asset/?id=76745352"

	Fireball.CanCollide = false
	Mesh.Scale = Vector3.new(2, 3.2, 3.2)
	Fireball.CFrame = CFrame.new(Fireball.Position, Mouse.Hit.p)

	local Particle = script.FireParticle:Clone()
	Particle.Parent = Fireball
	Particle.Enabled = true
	game.ReplicatedStorage.Skull.Damage:Clone().Parent = Fireball
	local Particle1 = game.ReplicatedStorage.Skull.Particle1:Clone()
	local Particle2 = game.ReplicatedStorage.Skull.Particle2:Clone()
	Particle1.Parent = Fireball
	Particle2.Parent = Fireball


	local Bv = Instance.new("BodyVelocity")
	Bv.Parent = Fireball
	Bv.MaxForce = Vector3.new(30000,30000,30000)
	Bv.Velocity = Character.HumanoidRootPart.CFrame.LookVector * 100
end)

2 answers

The only error I can see in your code is through FireBall.CFrame = Character.HumanoidRootPart.

If you change it to this it should work:

local Character = player.Character
wait(0.9)
local Fireball = Instance.new("Part")
Fireball.Parent = workspace
Fireball.CFrame = Character:WaitForChild("HumanoidRootPart").CFrame

1 comment

0

Thanks for the suggest, Btw i think i should get the Character from the local script (i fixed the error but fire ball isn't working.)

The issue was that i maded a variable in a Local Script with the name player, I changed player to Player and it fixed. Thanks for the help thought.

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