I am trying to make a tween that makes the “BlueHP” part go to the left of the player. I am trying to do this with look vectors but nothing is working and ive tried a bunch of things.
Here is my code:
script.Parent.OnServerEvent:Connect(function(plr)
local char = plr.Character or plr.CharacterAdded:Wait()
local plrHum = char:FindFirstChild("Humanoid")
local rp1: Part = char.HumanoidRootPart
local player = script.Player
local hb = require(game.ReplicatedStorage.HitboxStuff.hitboxModule)
local d = game:GetService("Debris")
local KB = require(game.ReplicatedStorage.KnockbackModule)
local tween = game:GetService("TweenService")
for i,v in pairs(plrHum:GetPlayingAnimationTracks()) do
v:Stop()
end
local playerPlay: AnimationTrack = plrHum:LoadAnimation(player)
playerPlay:Play()
game.SoundService.HPunlimited:Play()
local meterModule = require(game.ReplicatedStorage.MeterModule)
local blue = game.ReplicatedStorage.Blue:Clone()
blue.Parent = workspace.Fx
local weld = Instance.new("Weld")
weld.Parent = blue
weld.Part0 = char["Right Arm"]
weld.Part1 = blue
weld.C0 = CFrame.new(0,-1,0)
plrHum.AutoRotate = false
rp1.Anchored = true
local lv = rp1.CFrame.LookVector
playerPlay:GetMarkerReachedSignal("Blue"):Connect(function()
d:AddItem(blue, 0)
local HPblue = game.ReplicatedStorage.hp.BlueHP:Clone()
HPblue.Parent = workspace.Fx
HPblue.CFrame = rp1.CFrame
local tween1 = tween:Create(HPblue, TweenInfo.new(.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Position = HPblue.Position + rp1.CFrame.LookVector * 15}) --issue
tween1:Play()
end)
The tween im having issues with is marked with “issue”
It works the way it is, but what that code does is makes it go out infront, and not to the left.
any other way to change this code makes the tween not work
If anyone could help, it would be greatly appreciated! Thanks!