How can i make the "If" statement look if the "text.Text" is ANY of the "words" and not look if its not ONE of them like it does right now? (i really don't know how to explain this another way xD sorry)
wait(1)
local player = game.Players.LocalPlayer
local name = game.ReplicatedStorage.Players:FindFirstChild(player.Name).CivilName
local cam = workspace.CurrentCamera
local text = script.Parent.NameText
local storage = game.ReplicatedStorage.Players:FindFirstChild(player.Name)
local words = {"Type in your civil name!",""," ", " "}
function Done()
for i,v in ipairs(words) do
if text.Text ~= v then
name.Value = text.Text
player.Backpack.Camera:Destroy()
local room = workspace.Rooms:GetChildren()
local AllNone,DidFind=true,false
for i,v in pairs(room) do
if v.Player.Value == player.Name and not DidFind then
local pos = v.Dummy.Torso
DidFind=true
cam.CameraSubject = pos
cam.CoordinateFrame = CFrame.new(pos.Position)
* CFrame.Angles(0, 0, 0)
* CFrame.new(0, 0.5, 8)
elseif not DidFind then
AllNone=false
end
end
--GUI
script.Parent.Visible = false
script.Parent.Parent.Super.Visible = true
script.Parent:Destroy()
else
text.BackgroundColor3 = Color3.fromRGB(220,0,0)
wait(.1)
text.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
wait(.1)
text.BackgroundColor3 = Color3.fromRGB(220,0,0)
wait(.1)
text.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
wait(.1)
text.BackgroundColor3 = Color3.fromRGB(220,0,0)
wait(.1)
text.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
wait(.1)
end
end
end
script.Parent.Done.MouseButton1Click:connect(Done)

1 comment
You really should tab your code correctly