So I have a script that explodes you if you aren't worthy (if you aren't on the list) and if you are, gives you Excalibur.
Here's my script:
local WorthyUsers = {727003214,895311061,2206010441}
local SwordPrompt = script.Parent
SwordPrompt.Triggered:Connect(function(player)
for i,v in pairs(WorthyUsers) do
if v == player.UserId then
if not player.Backpack:FindFirstChild("Excalibur") and not player.Character:FindFirstChild("Excalibur") then
local Excalibur = game.ReplicatedStorage.Excalibur:Clone()
Excalibur.Parent = player.Backpack
end
end
if v ~= player.UserId then
local Explosion = Instance.new("Explosion")
Explosion.Parent = workspace
Explosion.Position = player.Character.HumanoidRootPart.Position
end
end
end)
The Problem Is Even If You Are Worthy After It Checks your UserId to the WorthyUsers Table, it will check all the other ones and since you can't have more than one UserId it also explodes you. Is there any workaround to this?

3 comments
Ok i'll try it
It works Thank You SOOO Much! (I changed it a bit to be more like my scripting)
Sure, not a problem. Glad I could help. Have a good one!