function onTouch(part) local Toucher = part.Parent:FindFirstChild("Humanoid") --The toucher
if Toucher ~= nil then --if someone touched our brick Toucher.Torso.CFrame = CFrame.new(-69.5, -6, -53)
end
end
fire1 = script.Parent fire1.Touched:connect(onTouch) --script for teleports you when you touch the part(fire1)
script.Parent.Touched:Connect(function(hit) --from here onwards, i really dont know what is wrong with the script to change body colors when you touch the part
end
local Toucher = fire1.Parent:FindFirstChild("Humanoid") wait(0) Toucher.Parent.FindFirstChild("Head").BrickColor = BrickColor.new(24) Toucher.Parent.FindFirstChild("Torso").BrickColor = BrickColor.new(23) Toucher.Parent.FindFirstChild("Left Arm").BrickColor = BrickColor.new(24) Toucher.Parent.FindFirstChild("Right Arm").BrickColor = BrickColor.new(24) Toucher.Parent.FindFirstChild("Left Leg").BrickColor = BrickColor.new(119) Toucher.Parent.FindFirstChild("Right Leg").BrickColor = 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
You Put .FindFirstChild you can't call something with a . you have to use :FindFirstChild(Arguments)
Also you Have multiple onTouch function firing and you set one to a variable? so you have 3?
This:
Toucher.Parent:FindFirstChild("Torso").BrickColor = BrickColor.new(23) Toucher.Parent:FindFirstChild("Left Arm").BrickColor = BrickColor.new(24) Toucher.Parent:FindFirstChild("Right Arm").BrickColor = BrickColor.new(24) Toucher.Parent:FindFirstChild("Left Leg").BrickColor = BrickColor.new(119) Toucher.Parent:FindFirstChild("Right Leg").BrickColor = BrickColor.new(119)
You can't do any of the new body parts on R15 vs R6. R15 has Upper and lower ect....
BUTTTT what you can do is there is something in the Character Called Body Colors you Can Make the the Script find that..... and change them
Like This: IK.. I left ur code all nasty but I commented everything out you don't need
function onTouch(part) local Toucher = part.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) end end --[[ Kk I have no Idea why you have any of this..... No need for 2 on touch function fire1 = script.Parent fire1.Touched:connect(onTouch) --script for teleports you when you touch the part(fire1) script.Parent.Touched:Connect(function(hit) --from here onwards, i really dont know what is wrong with the script to change body colors when you touch the part end local Toucher = fire1.Parent:FindFirstChild("Humanoid") wait(0) Toucher.Parent.FindFirstChild("Head").BrickColor = BrickColor.new(24) Toucher.Parent.FindFirstChild("Torso").BrickColor = BrickColor.new(23) Toucher.Parent.FindFirstChild("Left Arm").BrickColor = BrickColor.new(24) Toucher.Parent.FindFirstChild("Right Arm").BrickColor = BrickColor.new(24) Toucher.Parent.FindFirstChild("Left Leg").BrickColor = BrickColor.new(119) Toucher.Parent.FindFirstChild("Right Leg").BrickColor = 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
And that should work.. Just look at the properties of Body Colors or google it and change them. and delete the commented out code and try not to break the script :) don't forget to check this answer