I want the part to stay a constant distance from the player when made even when moving
I’ve tried using Run service to update the part when the player is moving but it looks weird and will not translate well when working with other scripts.
I also tried to anchor the HRP which bugs other scripts
Client
if input.KeyCode == Enum.KeyCode.E and Debounce == false then
if WalkAnim.IsPlaying == true then
WalkAnim:Stop(.1)
end
Debounce = true
Humanoid.WalkSpeed = 0
Humanoid.JumpPower = 0
task.wait(0.001)
Remotes.Character.Noelle.NoelleONE:FireServer(Player, Mouse.Hit.Position)
task.wait(1)
Humanoid.WalkSpeed = WS
Humanoid.JumpPower = JP
task.wait(4)
Debounce = false
end
Server
NoelleRemote.OnServerEvent:Connect(function(player)
local function Soundplay(Sound, MainParent)
if MainParent == nil then
MainParent = player.Character.HumanoidRootPart
end
local Soundeffect = Sound:Clone()
Soundeffect.Parent = MainParent
Soundeffect:Play()
game.Debris:AddItem(Soundeffect, Soundeffect.TimeLength)
end
Hitbox = Instance.new("Part")
Hitbox.Parent = game.Workspace.FxHolder
Hitbox.Size = Vector3.new(2.8, 5.17, 1.98)
Hitbox.Anchored = true
Hitbox.CanCollide = false
Hitbox.CFrame = player.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-3)
end)