Allright So I have a landmine script here.
local PlayersService = game:GetService("Players");
local DebrisService = game:GetService("Debris");
local Tool = script.Parent
local Debounce = false;
local CanDamage = false;
local Player
local Character
local SwingTrack
--post effects on landmine (really just a single color)
function handleplacedlandminefx(mine)
mine.PointLight.Enabled = true
while mine ~= nil do
mine.PointLight.Brightness = 0
mine.Union.BrickColor = BrickColor.Black()
task.wait(1.5)
mine.PointLight.Brightness = 23
mine.Union.BrickColor = BrickColor.Red()
mine.beep:Play()
task.wait(1.4)
end
end
Tool.Equipped:Connect(function()
Character = Tool.Parent
Debounce = false;
end)
Tool.Activated:Connect(function()
if not Debounce then
Debounce = true;
local Clone = Tool.Handle:Clone()
Clone.Parent = game.Workspace
Clone.CanCollide = true
Clone.CanTouch = true
wait(3)
task.spawn(handleplacedlandminefx, Clone)
Clone.Touched:Connect(function(hit)
if(hit.Parent:FindFirstChild("Humanoid")) then
local Humanoid = hit.Parent:FindFirstChild("Humanoid")
Humanoid:TakeDamage(100)
local explosion = Instance.new("Explosion", Clone.Parent)
explosion.Position = Clone.Position
for i, obj in pairs(hit.Parent:GetDescendants()) do
if obj:IsA("Motor6D") and obj.Parent.Name ~= "HumanoidRootPart" then
local Socket = Instance.new("BallSocketConstraint", obj.Parent)
local a1, a2 = Instance.new("Attachment", obj.Part0), Instance.new("Attachment", obj.Part1)
Socket.Attachment0 = a1
Socket.Attachment1 = a2
a1.CFrame = obj.C0
a2.CFrame = obj.C1
Socket.LimitsEnabled = true;
Socket.TwistLimitsEnabled = true;
obj:Destroy()
end
end
local BodyVelocity = Instance.new("BodyVelocity", hit.Parent:FindFirstChild("HumanoidRootPart"))
BodyVelocity.MaxForce = Vector3.new(1, 1, 1) * 10000
BodyVelocity.Velocity = Vector3.new(0, 100, 0) -- push upward
DebrisService:AddItem(BodyVelocity, 0.5)
Clone:Destroy()
end
end)
Debounce = false;
end
end)
It works fine. Really fine. Im really happy with how it works. Except theres one problem. Normally when the player steps on it he goes flying a bit. screams and then thats it. But when a NPC goes to hit the thing and the player is nearby to be affected by the explosion. Something very “Intresting” happens.
Now weridly. if I go to Client side view and select my playermodel blondeguy2001 I see this.
Huh? There is a werid part that is just sitting there. We know that it is a child of the Players Charcter because otherwise it would not show up when I select the MODEL of my Player. That must be what the camera is following(It should be following humanoid root part but whatever).
So I go and select every single child of the player model without acutally CLICKING the model button. A simple select
ANNDDDD DRUMROLL PLEASE…
wut?..
Allright. SO this part is a child of the players character. But also is not. Its a part that does not exist and also exists at the same time?
Allright? Lets see switch over to server side. But first lets note something.
Weridly when moving around in this state I get random Jitters, Like the player is hitting something that does not exist. Eventually I got it to where I jittered just a tiny bit upwards and the camera did not move back down. LIke I was climbing onto something that did not exist. Now lets switch over to server view.
WOAHHHH. there is us? Thats me. But on the client Im Missing all my limbs
What the client sees.(This is me on a seperate instance after trying this again. but on both times it was the same thing.)
But wait a minute. are we… Were holding onto the same ghost item.
Thats the same part from before. Its like the SERVER version of us is interacting with the CLIENT version of us.
Well now lets see. Does this part exist on the server.
So I selected the player model and yes it does. This part is a child of our player model. THATS GREAT
So lets go and select every single child of the player model and see if the part shows up like what it did not do in the client version.
Moment of truth please Every single child is selected
ANNDDDD… nothing…
What?
So this part is a child of the player model. It can interact with physics objects like the other humanoid parts. the Camera weridly follows it instead of everything else.
But also it is not a child of the player model at the same time. This part does not exist ANYWHERE in explorer and as far as explorers concerned this part does not exist.
This part exists and does not exist at the same time?