Item is a tool. I am trying to make a tool that is throwable. Server Code:
local Model = Item:FindFirstChildWhichIsA("Model")
for _, v in pairs(Item:GetDescendants()) do
if v:IsA("BasePart") then
v:SetNetworkOwner(Player)
v.CanCollide = false
end
end
Humanoid:LoadAnimation(ThrowAnimation):Play()
wait(0.25)
Model.Parent = workspace
ThrowEvent:FireClient(Player, Model.PrimaryPart, Item)
local LocalScript = Item:FindFirstChildWhichIsA("LocalScript")
LocalScript.Parent = Character
LocalScripts[Model.PrimaryPart] = LocalScript
Item:Destroy()
Client code:
ThrowEvent.OnClientEvent:Connect(function(Part, Item)
if Item ~= script.Parent then return end
local Velocity = Instance.new("BodyVelocity", Part)
Velocity.Velocity = ((Player:GetMouse().Hit.p - Part.Position).Unit*100)
delay(0.2, function()
Velocity:Destroy()
end)
local Name = Item.Name
Part.Touched:Connect(function(Hit)
for _, v in pairs(Character:GetDescendants()) do
if Hit == v then return end
end
ThrowEvent:FireServer(Part.Position, Part, Name)
end)
end)
WhY doEsN'T iT sEt ThE NeTwOrK OwNeR? I can still see hops? Why? How come it completely ignores my calls to :SetNetworkOwner()? This is EXTREMELY frustrating, I have no idea what's going on and I want to scream.
Help. Why is it that it is ignoring my EXPLICIT setting of ALL of the parts' network ownership in the tool to Player
Surely there's a better way than THIS:
spawn(function()
while v:IsDescendantOf(workspace) do
v:SetNetworkOwner(Player)
wait()
end
end)
There MUST be a more sensible way. I mean, why should I have to repeatedly set the network owner? Why is :SetNetworkOwner() broken?
