Doesn't make it slide, or do anything. Please help!
debounce = false script.Parent.Touched:connect(function(hit) if debounce == false then debounce = true local humanoid = hit.Parent:FindFirstChild("Humanoid") if humanoid then local player = game.Players:GetPlayerFromCharacter(hit.Parent) -- do stuff for i = 300, 150, -1 do wait(0.5) player.PlayerGui.Intro.Window.Position = UDim2.new(0,0,0.5,i) end debounce = false end end end)
Using Loops to slide a Gui doesn't always work so great, so you should try using Tweening. An example, and a possible fix for your script would be this:
Debounce = false script.Parent.Touched:connect(function(hit) if Debounce == false then Debounce = true local Humanoid = hit.Parent:FindFirstChild("Humanoid") if Humanoid then local Player = game.Players:GetPlayerFromCharacter(hit.Parent) Player.PlayerGui.Intro.Window:TweenPosition(UDim2.new(EndPosition), "Out", "Linear", 1, true, nil) end Debounce = false end end)