How to have an invisible part inside the players? Do i put it in a specific category like starter pack or something? It needs to move along with the player like a hitbox or something
I'm not really an expert but you could use a morph system which when a new player joins it automatically morphs them so they have a part in their chest which is invisible like a hit box or just write a script so if a humanoid is detected touching a part with another humanoid it does what you want it to do
UPDATE:
This script should work to morph it onto the player
If you put a script with the code I provided below in serverscriptservice with the part you want inside in the script it should weld it to the players uppertorso if using R15. If using R6 just simply change the UpperTorso text to the part you want
local charAdded = function(char) local a = script:WaitForChild('hitbox'):Clone() -- Hitbox should be changed to whatever the part name is local w = Instance.new('Motor6D') w.Part0 = char:WaitForChild('UpperTorso') -- Change this to whatever part of the character you wish to weld it to w.Part1 = a w.Parent = char['UpperTorso'] -- This should be the same part as above a.Parent = char end game:GetService('Players').PlayerAdded:Connect(function(plr) if plr.Character then charAdded(plr.Character) end plr.CharacterAdded:Connect(charAdded) end)
Yo Mast3r,
local part; -- Initialize this to where ever the part is, it can be anywhere as long as it's not on the client (For FE Enabled reasons) local players = game:GetService("Players"); players.PlayerAdded:Connect(function(plr) local char = plr.Character or plr.CharacterAdded:Wait(); local u_torso = char:WaitForChild("UpperTorso"); local new_weld = Instance.new("Weld Constraint"); local new_part = part:Clone(); new_part.Parent = u_torso; new_part.CFrame = u_torso.CFrame; new_weld.Parent = new_part; new_weld.Part0 = u_torso; new_weld.Part1 = new_part; end)
Thanks,
Best regards,
Idealist Developers