Hello again, I hope you’re having a good day. I was working on a telekineses system that’s supposed to allow players to pick up objects and throw them. Upon impact with anything, the object can be expected to explode and disappear. However, for debugging purposes, the part doesn’t disappear and instead gets anchored to exactly where it was when it made contact. The issue is that sometimes, the object wouldn’t move on the server-side but does move on my local machine. However, the server apparently acknowledges the existence of the part on the local position but does not render it as such, here’s a video :
Here’s the script :
--Shoot
local fired = false
local fireEvent = events.LeftClickedEvent.OnServerEvent:Connect(function(plr, targetLocation)
print("Clicked")
fired = true
force:Destroy()
local newForce = Instance.new("LinearVelocity")
newForce.Attachment0 = att0
newForce.VectorVelocity = (targetLocation.Position - target.Position) * 100 * target.Mass + Vector3.new(0, target.Mass * game.Workspace.Gravity, 0)
newForce.MaxForce = 1000 * target.Mass
newForce.Parent = target
--Debris:AddItem(target, 15)
target.Touched:Connect(function(hit)
print(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid:TakeDamage(100)
elseif hit.Parent.Parent:FindFirstChild("Humanoid") then
hit.Parent.Parent.Humanoid:TakeDamage(100)
end
local explosion = Instance.new("Explosion")
explosion.BlastRadius = 10
explosion.DestroyJointRadiusPercent = 40
explosion.Position = target.Position
--local part = Instance.new("Part")
--part.Anchored = true
--part.Position = target.Position
--target:Destroy()
target.Anchored = true
explosion.Parent = game.Workspace
--part.Parent = game.Workspace
end)
end)
repeat
wait()
until fired
print("D")
fireEvent:Disconnect()
There are no errors in the output while the targetLocation is the CFrame of the position the mouse is pointing to. This whole script is in a regular script, not a local or module script. Should I report this to Bug Reports? Please help.