Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Expected <eof> Near 'end'?

Asked by 6 years ago

Hello again, i have this script and the error says "<eof> got 'end'

What do i do now?

01local gun = workspace.Turret.Gun
02local originpoint = gun.CFrame.p
03 
04script.Parent.Radar.Radar.Touched:connect(function(plr)
05    if plr.Parent:IsA("Model") and plr.Parent:FindFirstChild("Humanoid") and game.Players.LocalPlayer.Character:FindFirstChild("Head") then
06    script.Parent.Gun.alert:Play()
07    local ignore = {script.Parent,game.Players(plr.Parent.Name)}
08    local ray = Ray.new(originpoint,plr.Parent.Head.CFrame.p.Unit*100)
09    local gun,position = workspace:FindPartOnRayWithIgnoreList(ray,ignore,false,true)
10 
11    local beam = Instance.new ("Part")
12    beam.BrickColor = BrickColor.Red()
13    beam.Material = "Neon"
14    beam.Transparency = 50
15    beam.Anchored = true
View all 56 lines...
0
You have an extra end like i told you before. stop deleting your questions User#5423 17 — 6y
0
well then were is it Theroofypidgeot 21 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Try if this works. If it works, mark my answer as correct

01local gun = workspace.Turret.Gun
02local originpoint = gun.CFrame.p
03 
04script.Parent.Radar.Radar.Touched:connect(function(plr)
05    if plr.Parent:IsA("Model") and plr.Parent:FindFirstChild("Humanoid") and game.Players.LocalPlayer.Character:FindFirstChild("Head") then
06    script.Parent.Gun.alert:Play()
07    local ignore = {script.Parent,game.Players(plr.Parent.Name)}
08    local ray = Ray.new(originpoint,plr.Parent.Head.CFrame.p.Unit*100)
09    local gun,position = workspace:FindPartOnRayWithIgnoreList(ray,ignore,false,true)
10 
11    local beam = Instance.new ("Part")
12    beam.BrickColor = BrickColor.Red()
13    beam.Material = "Neon"
14    beam.Transparency = 50
15    beam.Anchored = true
View all 48 lines...
Ad

Answer this question