So basically i have a interaction system if i trigger one off them, all off them trigger at the same time
local Player = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")
for _, part in pairs(workspace.Interactions:GetChildren()) do
local GUI = part.BillboardGui.Frame
for _, part in pairs(workspace.Interactions:GetChildren()) do
local pos = part.Position
UIS.InputEnded:connect(function(Input)
if Input.KeyCode == Enum.KeyCode.E then
GUI:TweenSize(UDim2.new(0, 0,0.9, 0), "In", "Linear", 3, true)
end
end)
UIS.InputBegan:connect(function(Input)
local KeyCode = Input.KeyCode
local distance = Player:DistanceFromCharacter(pos)
if KeyCode == Enum.KeyCode.E then
if distance <= 25 then
warn("Played Pressed E ")
GUI:TweenSize(UDim2.new(1, 0,0.1, 0), "In", "Linear", 5, true)
end
end
end)
end
end