Can you guys change this when touched a brick i change a team but not clicked pls
function Click(mouse)
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Really Black")
end
script.Parent.MouseButton1Down:connect(Click)
Can you guys change this when touched a brick i change a team but not clicked pls
function Click(mouse)
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Really Black")
end
script.Parent.MouseButton1Down:connect(Click)
Not a request site, BUT i'm bored so i'll help.
local Brick = game.Workspace["BrickNameHere"]
Brick.Touched:connect(function(Hit)
if Hit.Parent and Hit.Parent:FindFirstChild("Humanoid") then
local Player = game.Players:FindFirstChild(Hit.Parent.Name)
if Player then
Player.TeamColor = BrickColor.new("Really Black")
end
end
end
Using the GetPlayerFromCharacter() method of Players is a better way to do it than FindFirstChild().
Ik, I just got lazy.
I get the marked words Brick.Touched:connect(function(Hit)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
This is not a request site. This is very simple to do, just go to the wiki and do some research.