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

how would a make a clickdecetor event teamlocked?

local team = ("Really red")
script.Parent.MouseClick:Connect(function()
	if game.Players.LocalPlayer.TeamColor == team then
		script.Parent.MaxActivationDistance = 0
	script.Parent.Archivable = false
	script.Parent.Parent.tnt.Transparency = 0
	script.Parent.Parent.tnt1.Transparency = 0
	script.Parent.Parent.tnt2.Transparency = 0
	-------
	local fire = Instance.new("Fire")
    fire.size = 4
    fire.Parent = script.Parent.Parent.tnt
    --------
    local fire2 = Instance.new("Fire")
    fire2.size = 4
    fire2.Parent = script.Parent.Parent.tnt1
    -------------
    local fire2 = Instance.new("Fire")
    fire2.size = 4
    fire2.Parent = script.Parent.Parent.tnt2
	-------
	wait(3)
	local explosion = Instance.new("Explosion",game.Workspace)
		  explosion.BlastRadius = 12
		  explosion.BlastPressure = 1000000
		explosion.Position = script.Parent.Parent.Position
		script.Parent.Parent.Transparency = 1
		script.Parent.Parent.CanCollide = false
		script.Parent.Parent.tnt.Transparency = 1
	script.Parent.Parent.tnt1.Transparency = 1
	script.Parent.Parent.tnt2.Transparency = 1
	--------------------------------
	script.Parent.Parent.tnt.Fire:Destroy()
	script.Parent.Parent.tnt1.Fire:Destroy()
	script.Parent.Parent.tnt2.Fire:Destroy()
end
	end)

Sorry for the bad formatting I dont get an output error but the script won't work I made sure I was in the right team

1 answer

✓ Accepted answer

In your case the variable team is string, it must be brickcolor:

local team = Brickcolor.new("Really red")

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