Interaction script help

With this script it makes all proximity prompts custom prompts, for some reason the progress bar doesn’t tween, could somebody help me out?

Script:

local ProximityPromptService = game:GetService("ProximityPromptService")

ProximityPromptService.PromptShown:Connect(function(prompt)
	prompt.Style = Enum.ProximityPromptStyle.Custom
	local interactionBillboardGui = script.InteractionBillboardGui:Clone()
	interactionBillboardGui.Parent = prompt.Parent
	interactionBillboardGui.Enabled = true
	interactionBillboardGui.Interact.Information.Information.Text = prompt.ActionText
	interactionBillboardGui.Interact.Button.TextLabel.Text = prompt.KeyboardKeyCode.Name
	
	if prompt.HoldDuration >= 0 then
		interactionBillboardGui.HoldBar.Visible = true
		interactionBillboardGui.Interact.Button.HoldText.Visible = true
	else
		interactionBillboardGui.HoldBar.Visible = false
		interactionBillboardGui.Interact.Button.HoldText.Visible = false
	end

	local holdBar = interactionBillboardGui:WaitForChild("HoldBar")
	local holdDuration = prompt.HoldDuration
	local holdTween

	local function startHold()
		holdTween = holdBar.Progress:TweenSize(UDim2.new(1, 0, 1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, holdDuration, true)
	end

	local function stopHold()
		if holdTween then
			holdBar.Progress:TweenSize(UDim2.new(0, 0, 1, 0), nil, Enum.EasingStyle.Quad, 0.1, true)
		end
	end

	prompt.PromptButtonHoldBegan:Connect(startHold)
	prompt.PromptButtonHoldEnded:Connect(stopHold)

	ProximityPromptService.PromptHidden:Connect(function(hiddenPrompt)
		local promptGui = hiddenPrompt.Parent:FindFirstChild("InteractionBillboardGui")
		if promptGui then
			promptGui:Destroy()
		end
	end)
end)

You need to add tween service I believe

local TweenService = game:GetService(“TweenService”)

local part = Instance.new(“Part”)
part.Position = Vector3.new(0, 10, 0)
part.Color = Color3.new(1, 0, 0)
part.Anchored = true
part.Parent = game.Workspace

local goal = {}
goal.Position = Vector3.new(10, 10, 0)
goal.Color = Color3.new(0, 1, 0)

local tweenInfo = TweenInfo.new(5)

local tween = TweenService:Create(part, tweenInfo, goal)

tween:Play()

Would I need TweenService for TweenSize?

Based off of this yes haven’t tested the theory myself but from what others have said. I believe it’s still required.

Alright, I’ll give it a shot an see if it works.

Still doesn’t work.

local ProximityPromptService = game:GetService("ProximityPromptService")
local TweenService = game:GetService("TweenService")

ProximityPromptService.PromptShown:Connect(function(prompt)
	prompt.Style = Enum.ProximityPromptStyle.Custom
	local interactionBillboardGui = script.InteractionBillboardGui:Clone()
	interactionBillboardGui.Parent = prompt.Parent
	interactionBillboardGui.Enabled = true
	interactionBillboardGui.Interact.Information.Information.Text = prompt.ActionText
	interactionBillboardGui.Interact.Button.TextLabel.Text = prompt.KeyboardKeyCode.Name

	local holdBar = interactionBillboardGui:WaitForChild("HoldBar")
	local holdDuration = prompt.HoldDuration

	local function startHold()
		interactionBillboardGui:WaitForChild("HoldBar").Progress:TweenSize(UDim2.new(1, 0, 1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, holdDuration, true)
	end

	local function stopHold()
		interactionBillboardGui:WaitForChild("HoldBar").Progress.Size = UDim2.new(0, 0, 1, 0)
	end

	prompt.PromptButtonHoldBegan:Connect(startHold)
	prompt.PromptButtonHoldEnded:Connect(stopHold)
	
	if prompt.HoldDuration ~= 0 then
		interactionBillboardGui.HoldBar.Visible = true
		interactionBillboardGui.Interact.Button.HoldText.Visible = true
	elseif prompt.HoldDuration == 0 then
		interactionBillboardGui.HoldBar.Visible = false
		interactionBillboardGui.Interact.Button.HoldText.Visible = false
	end

	local function promptHidden(hiddenPrompt)
		local promptGui = hiddenPrompt.Parent:FindFirstChild("InteractionBillboardGui")
		if promptGui then
			promptGui:Destroy()
		end
	end

	ProximityPromptService.PromptHidden:Connect(promptHidden)
end)

local ProximityPromptService = game:GetService(“ProximityPromptService”)
local TweenService = game:GetService(“TweenService”)
local tweenInfo = TweenInfo.new(5) - should be tween time length

ProximityPromptService.PromptShown:Connect(function(prompt)
prompt.Style = Enum.ProximityPromptStyle.Custom
local interactionBillboardGui = script.InteractionBillboardGui:Clone()
interactionBillboardGui.Parent = prompt.Parent
interactionBillboardGui.Enabled = true
interactionBillboardGui.Interact.Information.Information.Text = prompt.ActionText
interactionBillboardGui.Interact.Button.TextLabel.Text = prompt.KeyboardKeyCode.Name

local holdBar = interactionBillboardGui:WaitForChild("HoldBar")
local holdDuration = prompt.HoldDuration

local function startHold()

local tweenInfo = TweenInfo.new(

2, – Time

Enum.EasingStyle.Linear, – EasingStyle

Enum.EasingDirection.Out, – EasingDirection

-1, – RepeatCount (when less than zero the tween will loop indefinitely)

true, – Reverses (tween will reverse once reaching it’s goal)

0 – DelayTime

)

local tween = TweenService:Create(interactionBillboardGui, tweenInfo, { Position = Vector3.new(0, 30, 0) })

tween:Play()

end

local function stopHold()
	interactionBillboardGui:WaitForChild("HoldBar").Progress.Size = UDim2.new(0, 0, 1, 0)
end

prompt.PromptButtonHoldBegan:Connect(startHold)
prompt.PromptButtonHoldEnded:Connect(stopHold)

if prompt.HoldDuration ~= 0 then
	interactionBillboardGui.HoldBar.Visible = true
	interactionBillboardGui.Interact.Button.HoldText.Visible = true
elseif prompt.HoldDuration == 0 then
	interactionBillboardGui.HoldBar.Visible = false
	interactionBillboardGui.Interact.Button.HoldText.Visible = false
end

local function promptHidden(hiddenPrompt)
	local promptGui = hiddenPrompt.Parent:FindFirstChild("InteractionBillboardGui")
	if promptGui then
		promptGui:Destroy()
	end
end

ProximityPromptService.PromptHidden:Connect(promptHidden)

end)

On mobile so you probably need to fix it but you are missing tween info, and playing the tween.