function onTouch(fire1) local Toucher = fire1.Parent:FindFirstChild("Humanoid") --The toucher
if Toucher ~= nil then --if someone touched our brick Toucher.Torso.CFrame = CFrame.new(-69.5, -6, -53) Toucher.Parent:FindFirstChild("Body Colors").HeadColor = BrickColor.new(24) Toucher.Parent:FindFirstChild("Body Colors").LeftArmColor = BrickColor.new(24) Toucher.Parent:FindFirstChild("Body Colors").RightArmColor = BrickColor.new(24) Toucher.Parent:FindFirstChild("Body Colors").TorsoColor = BrickColor.new(23) Toucher.Parent:FindFirstChild("Body Colors").LeftLegColor = BrickColor.new(119) Toucher.Parent:FindFirstChild("Body Colors").RightLegColor = BrickColor.new(119)
end
end
script.Parent.Touched:connect(onTouch) --so what im trying to do is to make a part that teleports the toucher as well as color thier body
script.Parent.Touched:connect(function(hit) local find = hit.Parent:FindFirstChild("Humanoid") if find then local player = game.Players:GetPlayerFromCharacter(hit.Parent) local findS = player.Backpack:FindFirstChild("woodensword") if not findS then local sword = game.Lighting.woodensword:Clone() sword.Parent = player.Backpack end end if not find then print('no humanoid') end end)
--this script teleports the character when they step on a part and also color their body and give them a woodensword. However, when i hold the woodensword, i get teleported to the baseplate and my character model's head will get stuck under the baseplate and when i try to swing the sword, my body swings but the sword is stuck there