local lp = game.Players.LocalPlayer local anim = game.Players.LocalPlayer.PlayerScripts.AnimOne local camera = script.Parent.Parent function run() if anim.Value == false then local md = game.Lighting.VipOne:Clone() anim.Value = true md.Parent = lp.Character md:SetPrimaryPartCFrame(lp.Character.HumanoidRootPart.CFrame) game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0 elseif anim.Value == true then anim.Value = false game.Players.LocalPlayer.Character.VipOne:destroy() --or game.Players.LocalPlayer.Character.VipTwo:destroy() game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 end end script.Parent.MouseButton1Down:connect(run)
15th line
all im trying to do is if the VipOne Model is Not in there but the VipTwo is , then i want to remove the VipTwo , i just dont know how can i do that.
sorry about the question thingy , im so pissed that i was not able to come up with a question "i cant talk k"
Try this:
local char = game.Players.LocalPlayer.Character -- use more variables local x = char:FindFirstChild("VipOne") or char:FindFirstChild("VipTwo") -- get one or the other, if none then nil if(x)then -- check if nil x:Destroy() -- if not destroy end