Nope.
Here’s the code again:
local Remote = game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("Shoot")
Remote.OnServerEvent:Connect(function(thingPos, mouseHit)
local Speed = 100
local Bullet = game.ReplicatedStorage.Projectiles.Bullet:Clone()
Bullet.Parent = workspace
--Bullet.Position = guy.Character.HumanoidRootPart.CFrame.lookVector
Bullet.CFrame = CFrame.new(mouseHit)
--Bullet.Velocity = Bullet.CFrame.lookVector --* Speed
local thing = Instance.new("BodyVelocity")
thing.Parent = Bullet
thing.Velocity = Bullet.CFrame.lookVector*Speed
end)
Bruh
Now you did it the other way
Add back the player
variable, and remove the guy
variable in your LocalScript
local Remote = game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("Shoot")
Remote.OnServerEvent:Connect(function(player, thingPos, mouseHit)
local Speed = 100
local Bullet = game.ReplicatedStorage.Projectiles.Bullet:Clone()
Bullet.Parent = workspace
--Bullet.Position = guy.Character.HumanoidRootPart.CFrame.lookVector
Bullet.CFrame = CFrame.new(thingPos, mouseHit)
--Bullet.Velocity = Bullet.CFrame.lookVector --* Speed
local thing = Instance.new("BodyVelocity")
thing.Parent = Bullet
thing.MaxForce = Vector3.new(math.huge, math.huge, mathhuge)
thing.Velocity = Bullet.CFrame.LookVector * Speed
end)
thingPos
is a CFrame value…?
Apparently it’s the player… even though I already figured that out
Edit: It’s the position, but… it registers as the player on the server/remoteevent???
Not in the current script, your old script was only passing the thingPos
& mouseHit
variables, when you should’ve passed the player
as well that fired the Event
Try printing thingPos.Parent
and see what outputs back