Well a simple weapon selection GUI. It will not work, it prints the "No spawn selected" every time I try to spawn. It gives me a weapon but will not spawn me. I've used this teleport code before so I know it would teleport me if I could figure out whats wrong here. Also no errors come up in the output. Here is the code:
local plrbck = script.Parent.Parent.Parent.Parent.Backpack local wep = script.Parent.Parent.Weapon local m4clone = script.Parent.Parent.Guns.M4:Clone() local m8clone = script.Parent.Parent.Guns.Barrett:Clone() local spawn = script.Parent.Parent.Spawnloc.Text local function Click() if wep.Text == "None" then print("No Weapon Selected!") elseif wep.Text == "M4" then m4clone.Parent = plrbck if spawn == "A" then script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(game.Workspace.Map.spawn1.Position) print("PlayerSpawned") script.Parent.Parent:Destroy() elseif spawn == "None" then script.Parent.Parent.alert.Text = "No Spawn Selected! Please Reset and re-select." end elseif wep.Text == "M82" then m8clone.Parent = plrbck if spawn == "A" then script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(game.Workspace.Map.spawn1.Position) print("PlayerSpawned") script.Parent.Parent:Destroy() elseif spawn == "None" then script.Parent.Parent.alert.Text = "No Spawn Selected! Please Reset and re-select." end end end script.Parent.MouseButton1Down:connect(Click)
Can someone help me please? Any and all help is greatly appreciated.