I am trying to make it so that when a player touches a part a gui tweens.
It works the first time, but after the first time these errors pop up.
These are the script
local db = false local StarterGui = game:GetService("StarterGui") script.Parent.Touched:connect(function(hit) if hit.Parent:WaitForChild("Humanoid") then local db = true local player = game.Players:GetPlayerFromCharacter(hit.Parent) local frame = player:WaitForChild("PlayerGui"):WaitForChild("Shop"):WaitForChild("ShopFrame") frame:TweenPosition(UDim2.new(0.5,-250,0.5,-175),"Out","Quint",1,true) print("opened") wait(0.5) end db = false end)
A help would be very appreciated