(Make sure to hit "View Scorce" next to the script so you can see the whole thing)
I have a part in workspace with a script in it:
function OnTouch(hit) if hit.Parent:FindFirstChildOfClass("Humanoid") then game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui.Wraps.Frame.Visible = true game.Players:GetPlayerFromCharacter(hit.Parent).Character:MoveTo(Vector3.new(-25, 405, 375)) end end script.Parent.Touched:Connect(OnTouch)
When the player touches it a gui is supposed to pop up. This gui pops up the first time but it doesn't the second time I touch the part though the player still moves. Dose anyone know why.
P.S. Here is the script for the close button in the gui:
local Wraps = game.Players.LocalPlayer:WaitForChild("Wraps") function Close() script.Parent.Visible = false end wait(3) local PlayerValue = Instance.new("ObjectValue", script.Parent) PlayerValue.Name = "Player" PlayerValue.Value = game.Players.LocalPlayer for i, wrap in pairs(Wraps:GetChildren()) do local CurrentButton = script.Template:Clone() CurrentButton.Name = wrap.Name CurrentButton.Text = wrap.Name CurrentButton.Value = wrap end script.Parent.Close.MouseButton1Click:Connect(Close)