script.Parent.Touched:connect(function(part) if part.Parent:FindFirstChild("Humanoid") ~= nil then script.LocalScriptz:clone().Parent = game.Players:FindFirstChild(part.Parent.Name).PlayerGui end end)
It copies more than and lags the game. I know it's stupid and I can figure it out... But still... Help!
:clone()
Use :Clone() instead, also its because you are not debouncing.
You need to make a variable called debounce at the very top of the script Make it false Then, Make an if statement, that only carries on if it's false After that, redefine it true. It should look like this:
debounce = false script.Parent.Touched:connect(function(part) if debounce == false then debounce = true if part.Parent:FindFirstChild("Humanoid") ~= nil then local cloned = script.LocalScriptz:Clone() cloned.Parent = Game.Players:FindFirstChild(part.Parent.Name).PlayerGui end end end)