I’ve been working on a script in which creates a part and the original idea is to have it just go to the front side of the player, but later decided to revamp it to make it go between the players HRP and the mouse positioning, without changing the size of the beam.
What happens: https://gyazo.com/a774111e30cbcfbfa2a1d3f624a45ebd
Local script (firing event):
uis.InputBegan:Connect(function(input,GPE)
if not GPE and input.KeyCode == Enum.KeyCode.F then
local mouse = plr:GetMouse()
game.ReplicatedStorage.Kamehameha:FireServer(mouse.Hit.p)
local t = Instance.new("Animation")
t.AnimationId = "rbxassetid://7409187320"
local td = Animator:LoadAnimation(t)
td.Priority = Enum.AnimationPriority.Action
td.Looped = false
td:Play()
end
end)
Server Script (important part):
new.Beam.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position,mouse)*CFrame.Angles(1.5708,0,0)
new.Beam.CFrame = new.Beam.CFrame*CFrame.new(0,0,-43)