Im confused about what went wrong. Its a workspace script.
-- GetService
local proximityprompt = game:GetService("ProximityPromptService")
local inputservice = game:GetService("UserInputService")
local ts = game:GetService("TweenService")
local ps = game:GetService("Players")
-- Other Variables
local player = game.Players.LocalPlayer.Character
local mouse = game.Players.LocalPlayer:GetMouse()
local openpc = script.Parent
local typingpc = script.Parent.Parent.typingpc
local holdDuration = typingpc.HoldDuration
local animation1 = 'http://www.roblox.com/asset/?id=6399052845'
local animation2 = 'http://www.roblox.com/asset/?id=6406983765'
local anim = Instance.new("Animation")
local randomNumber = math.random(5,25)
local progressbar = game.StarterGui.SurfaceGui.Screen.Bar.Progress
local screen = game.StarterGui.SurfaceGui.Screen
randomNumber = holdDuration

2 comments
Is It a serverscript or a localscript?
server script