Advertisement
HowToRoblox

AreaEnterScript

Dec 18th, 2019
5,889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. local part = script.Parent
  2.  
  3. local debounce = false
  4.  
  5.  
  6. part.Touched:Connect(function(touch)
  7.    
  8.     if not touch.Parent:FindFirstChild("Humanoid") then return end
  9.    
  10.     if debounce == true then return end
  11.    
  12.    
  13.     debounce = true
  14.    
  15.    
  16.     local char = touch.Parent
  17.    
  18.     local plr = game.Players:GetPlayerFromCharacter(char)
  19.        
  20.        
  21.     plr.PlayerGui.AreaEnterGui.AreaTitle:TweenPosition(UDim2.new(0.374, 0, 0.015, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 0.5)
  22.    
  23.    
  24.     wait(1)
  25.    
  26.    
  27.     plr.PlayerGui.AreaEnterGui.AreaTitle:TweenPosition(UDim2.new(0.374, 0, -1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 0.5)
  28.        
  29.     debounce = false
  30.    
  31.    
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement