Hello! I’m creating a military training zone, made for a group. I’m still creating it, including some scripts in it. Most of them work but one of them I’m gonna talk about here doesn’t.
-
What do you want to achieve?
I saw a tutorial on YouTube, with a guy showing his script. I used the tutorial and edited the script, everything looks great. The script is used to give specific items automatically to player depending on his rank in group. -
What is the issue?
bruh - YouTube
i guess people didnt see whats the error, the error isExpected <eof>, got 'end'
on the lastend)
-
What solutions have you tried so far?
No. I don’t know what type of error is this and how it can be fixed.
The script:
local Folder = game.ServerStorage.CardStorage
local Storage = game.ServerStorage
local AP = Folder["AP ID Card"]
local Trainee = Folder["Trainee ID Card"]
local Corporal = Folder["Corporal ID Card"]
local Sergeant = Folder["Sergeant ID Card"]
local Lieutenant = Folder["Lieutenant ID Card"]
local TL = Folder["Team Leader ID Card"]
local CO = Folder["CO ID Card"]
local Commander = Folder["Commander ID Card"]
local HC = Folder["HC ID Card"]
local OWNER = Folder["OWNER ID Card"]
local EHU = Storage["EHU ID Card"]
local Armoury = Storage["Armoury Keycard"]
local HR = Folder["HR ID Card"]
local Detain = Storage.Detain
local Remote = Storage.Remote
local M4A1 = Storage.M4A1
local Deagle = Storage["Desert Eagle"]
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
--if player.TeamColor == BrickColor.new("Bronze") then
--print("Onteam")
if player:GetRankInGroup(10870927) == 100 then --Awaiting Placement
local a = AP:Clone()
a.Parent = player.Backpack
elseif player:GetRankInGroup(10870927) == 150 then --Trainee Operative
local a = Trainee:Clone()
a.Parent = player.Backpack
elseif player:GetRankInGroup(10870927) == 180 then --Corporal Operative
local a = Corporal:Clone()
a.Parent = player.Backpack
elseif player:GetRankInGroup(10870927) == 200 then --Sergeant Operative
local a = Sergeant:Clone()
a.Parent = player.Backpack
elseif player:GetRankInGroup(10870927) == 205 then --Lieutenant Operative
local a = Lieutenant:Clone()
a.Parent = player.Backpack
elseif player:GetRankInGroup(10870927) == 251 then --Team Leader
local a = TL:Clone()
a.Parent = player.Backpack
local b = Armoury:Clone()
a.Parent = player.Backpack
local c = M4A1:Clone()
a.Parent = player.Backpack
local d = Deagle:Clone()
a.Parent = player.Backpack
elseif player:GetRankInGroup(10870927) == 252 then --Commanding Officer
local a = CO:Clone()
a.Parent = player.Backpack
local b = Armoury:Clone()
a.Parent = player.Backpack
local c = M4A1:Clone()
a.Parent = player.Backpack
local d = Deagle:Clone()
a.Parent = player.Backpack
local f = Remote:Clone()
a.Parent = player.Backpack
elseif player:GetRankInGroup(10870927) == 253 then --Commander
local a = Commander:Clone()
a.Parent = player.Backpack
local b = Armoury:Clone()
a.Parent = player.Backpack
local c = M4A1:Clone()
a.Parent = player.Backpack
local d = Deagle:Clone()
a.Parent = player.Backpack
elseif player:GetRankInGroup(10870927) == 254 then --Head Commander
local a = HC:Clone()
a.Parent = player.Backpack
local b = Armoury:Clone()
a.Parent = player.Backpack
local c = M4A1:Clone()
a.Parent = player.Backpack
local d = Deagle:Clone()
a.Parent = player.Backpack
elseif player:GetRankInGroup(10870927) == 255 then --Owner
local a = OWNER:Clone()
a.Parent = player.Backpack
local b = Armoury:Clone()
a.Parent = player.Backpack
local c = M4A1:Clone()
a.Parent = player.Backpack
local d = Deagle:Clone()
a.Parent = player.Backpack
end
end)
end)
end)
Please help!
(i’m sorry if there was a topic that was answered, based on the same problem as mine’s, i dont know what to search about it)