Hello forum, I was making a system where when the player walks into a part a script activates and a BillboardGUI frame tweens down, (This is a regular script because apparently, Roblox doesn’t allow LocalScripts in BillboardGUI), it hasn’t worked once to tween the UI down when a player goes into the part and I am very stressed, I’ve tried posting about it, I’ve tried doing it myself, nothing has worked.
local chat = script.Parent
local child = script.Parent.Text
local touching = false
chat.Visible = false
child.Visible = false
local function onTouch(hit)
print("Touched")
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if player and not touching then
print("Found Player")
chat.Visible = true
chat:TweenSize(
UDim2.new(0, 252,0, 50), --End size
Enum.EasingDirection.Out,
Enum.EasingStyle.Elastic,
2
)
print("Tweened")
child.Visible = true
touching = true
end
end
local function onTouchEnded()
if touching then
print("Touch has ended")
chat.Visible = false
child.Visible = false
touching = false
end
end
game.Workspace.Characters.Cardinal.Activator.Touched:Connect(onTouch)
game.Workspace.Characters.Cardinal.Activator.TouchEnded:Connect(onTouchEnded)
print("Done")