local players = game:GetService('Players')
local rep = game:GetService("ReplicatedStorage")
function Triggered(Plr)
local Beam = rep.Connector:Clone()
local weld = Instance.new("Weld")
local BallSocket = Instance.new("BallSocketConstraint")
weld.Part0 = Beam
weld.Part1 = Plr.Character.Head
end
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local promptClone = script.RequestPrompt:Clone()
promptClone.Parent = char:FindFirstChild("NameTag")
promptClone.ActionText = "Link up with ".. player.Name
promptClone.Triggered:Connect(Triggered)
end)
end)
Okay but the beam as well was not parented, so now you’ll need to parent the beam to something in the workspace. Cloning something leaves it in this nil space until you place it into the location you desire
So now it spawns in the player, kinda good, but it well always clone a in a different way depending on which way the player is looking, how do I make it so that no matter where the player is looking, it spawns at the same rotation.
Essentially you need to reference the position of an attachment (when talking about the beams or constraints) to the player’s humanoidRootPart’s CFrame LookVector. With that it’d go forward from the player’s character. Note the look Vector is just a unit, so you’ll need to multiply it by however far you want the position to go