game.Players.PlayerAdded only runs when a player joins the game so your code will not run until the player has joined the game. But that has already happened, so the code will never actually end up running
You probably don’t want to wait for the player to respawn if they already have a character. It’s also recommended to set parent after setting properties.
local prompt = script.Parent
prompt.Triggered:Connect(function(player)
local character = player.Character or player.CharacterAdded:Wait()
local cape = game:GetService("ServerStorage"):WaitForChild("Cape1.0"):Clone()
cape:SetPrimaryPartCFrame(player.Character.UpperTorso.CFrame)
local Weld = Instance.new("Weld")
Weld.Part0 = character.UpperTorso
Weld.Part1 = cape.PrimaryPart
Weld.C0 = CFrame.new(0,-0.91,0.06)
Weld.C1 = CFrame.Angles(0, 0, 0)
Weld.Parent = character.UpperTorso
cape.Parent = player.Character
end)
end)