I have put in a teleportation script in my game where you click the GUI and you teleport to a part. But the thing is, I also want the GUI (or Script) to take away the gear that the player has so they can't harm players (It is an AFK Lobby in a murder game. You teleport to the Lobby so that you can't get killed if your AFK, but I don't know how to make it so it takes gear away).
All you have to do is put this at the end of the script
player = script.Parent.Parent.Parent.Parent.Parent.Parent db = false function Click(mouse) if not db then db = true local human = player.Character:FindFirstChild("Humanoid") if human then human:UnequipTools() end jok=player.Backpack jok:Remove() end end script.Parent.MouseButton1Down:connect(Click)
I am not sure but i think this could work
local player = game.Players.LocalPlayer Active = true -- Change to "true"/"false" to activate/deactivate script function Clicked() if Active = true then do -- Continues script if Active is true player.BackPack:remove() -- Removes BackPack from player game.Lighting.Backpack:clone().Parent = player -- Clones a empty BackPack into player end end script.Parent.MouseButton1Down:connect(Clicked) -- Tells script what triggers the function
Marked as Duplicate by Tkdriverx, adark, and BlueTaslem
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?