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

Lvl door error, help pls?

Asked by 10 years ago
Lvl = script.Parent.Parent.Parent.LvlValue.Value
kill = false -- Set this to ture if you want to kill the player if their not the right lvl
script.Parent.Touched:connect(function(hit)
if game.Players.LocalPlayer.leaderstats.Lvl.Value == Lvl or game.Players.LocalPlayer.leaderstats.Value >= Lvl then
script.Parent.CanCollide = false
script.Parent.Transparency = 0.4
wait(3)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
elseif kill == true then 
a = game.Players.LocalPlayer:GetPlayerFromCharacter
a.Torso:Destroy()
end
end
end)

there's a error on line 12, but I don't know how to fix it. it says: function arguments expected near 'a'

Answer this question