Hello,
I have tried ABSOLUTELY Everything, I have NO idea why this won’t work.
It’s a trap system. This is the weirdest thing:
When I place the trap in workspace and spawn next to it(without it being cloned or anything), it works perfectly! But when I clone and change the position, it doesn’t work at all!
The script inside the trap is irrelevant I think.
Layout:

Script inside ServerScriptService:
local function PlaceTrap(Player)
if Player:FindFirstChild('DogeTag') and game.ReplicatedStorage.Values.GameInProgress.Value == true and Player.TrapDebounce.Value == false then
if Player.TrapCount.Value > 0 then
Player.TrapDebounce.Value = true
Player.TrapCount.Value = Player.TrapCount.Value - 1
local HRP = Player.Character.HumanoidRootPart
local Trap = game.Workspace.TrapsFix:FindFirstChild(Player.EquippedTrap.Value)
local ClonedTrap = Trap:Clone()
if workspace:FindFirstChild('Map1') then
ClonedTrap.Parent = workspace.Map1
elseif workspace:FindFirstChild('Map2') then
ClonedTrap.Parent = workspace.Map2
elseif workspace:FindFirstChild('Map3') then
ClonedTrap.Parent = workspace.Map3
end
if ClonedTrap ~= nil then
print('placing trap....')
ClonedTrap:SetPrimaryPartCFrame(Player.Character.HumanoidRootPart.CFrame - Vector3.new(0,4.2,0))
wait(5)
Player.TrapDebounce.Value = false
else
warn('Trap not found')
end
end
end
end
The trap gets placed, but doesn’t work.
The trap script is irrelevant I’m sure, but here it is anyway:
local Trap = script.Parent
local Open = Trap.Open
local Closed = Trap.Open.Close
local HitBox = Open.Hitbox
local Connection
Connection = HitBox.Touched:Connect(function(Hit)
print('touched')
if Hit.Parent:FindFirstChild('Humanoid') then
print('Found humanoid')
local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
local Humanoid = Hit.Parent.Humanoid
local Animation = Humanoid:LoadAnimation(workspace.TrappedAnimation)
if not Player:FindFirstChild('DogeTag') then
print('is not the doge')
Connection:Disconnect()
Humanoid.JumpPower = 0
Humanoid.WalkSpeed = 0
Animation:Play()
Open.Stunned:Play()
Open.Transparency = 1
Closed.Transparency = 0
spawn(function()
wait(Open.Cooldown.Value)
Animation:Stop()
Humanoid.JumpPower = 50
Humanoid.WalkSpeed = 16
wait(3)
script.Parent:Destroy()
end)
end
end
end)
Nothing prints, there aren’t any errors at all, I have tried everything possible. Doesn’t work.