I have this written, and instead of breaking the characters joints, I was wanting to find the characters humanoid and make it nil. Thanks!
local name = "X8311"
script.Parent.Touched:connect(function(hit) local h = hit.Parent:findFirstChild("Humanoid") if h then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr then if plr:IsBestFriendsWith(id) or plr.Name == name then script.Parent.Transparency = 1 script.Parent.CanCollide = true wait(.3) script.Parent.Transparency = 1 script.Parent.CanCollide = false else hit:BreakJoints() end end end end)
Set the Parent
of hit.Parent.Humanoid
to nil
local name = "X8311" local id = 10073558 script.Parent.Touched:connect(function(hit) local h = hit.Parent:findFirstChild("Humanoid") if h then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr then if plr:IsBestFriendsWith(id) or plr.Name == name then script.Parent.Transparency = 1 script.Parent.CanCollide = true wait(.3) script.Parent.Transparency = 1 script.Parent.CanCollide = false else hit.Parent.Humanoid.Parent = nil end end end end)
You can make it nil by h = nil.
local name = "X8311" local id = 10073558 script.Parent.Touched:connect(function(hit) local h = hit.Parent:findFirstChild("Humanoid") if h then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr and plr:IsBestFriendsWith(id) or plr.Name == name then script.Parent.Transparency = 1 script.Parent.CanCollide = true wait(0.3) script.Parent.Transparency = 1 script.Parent.CanCollide = false else h = nil end end end)