Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make on team touch script then print ("Hello") ( Local Script ) ? ...

How to make ? - if red team touch part then

print("Hello world") - it's possible ?

-Thank u and best regards !

-PPJASK

1 comment

0

You can't do this in a local script without a remote event or remote function.

1 answer

✓ Accepted answer

You could do ( Never done this before so... ):

local Players = game:GetService("Players")

game.Workspace.Part.Touched:Connect(function(hit)
	local player = Players:GetPlayerFromCharacter(hit.Parent)
	if hit.Parent:FindFirstChild("Humanoid") then
		if player.TeamColor == "Really Red" then			
			print("Hello world")
		end
	end
end)

Remember I have never done something like this so it might not be perfect...

1 comment

0

Check for the Humanoid first!

This discussion is preserved as it was. New answers, comments, and votes are closed.