generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Anti-TK

Previous Thread :: Next Thread 
SuperiorEternal is not online. SuperiorEternal
Joined: 22 Aug 2009
Total Posts: 2365
16 Nov 2014 08:54 PM
if humanoid then
if game.Players:GetPlayerFromCharacter(humanoid.Parent).TeamColor ~= plr.TeamColor then
humanoid.Health = humanoid.Health - 10
end
end

Any suggestions on how exactly I should complete this? I tried adding in the else but nothing I do works.
Report Abuse
LizardKuGarang is not online. LizardKuGarang
Joined: 03 Aug 2013
Total Posts: 42
16 Nov 2014 09:03 PM
teams = red,blue

player = p

if p is team red then p cannot kill another red p()

if p is team blue then p cannot kill another blue p()

game.worksapce.parent = mommmmma()

parent = set player touch forcefield())

Report Abuse
SuperiorEternal is not online. SuperiorEternal
Joined: 22 Aug 2009
Total Posts: 2365
16 Nov 2014 09:05 PM
...holy crap you suck at scripting....... you have no clue how it works...
Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
16 Nov 2014 09:19 PM
if user.touched = team = team blue then do

team.blue end

do (nothing)
end

if team other then do kill()

end
Report Abuse
SuperiorEternal is not online. SuperiorEternal
Joined: 22 Aug 2009
Total Posts: 2365
16 Nov 2014 09:21 PM
What is they are a dummy and don't have a player attatched to them?
Report Abuse
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
16 Nov 2014 10:43 PM
1337 scripting skills xD.

Anyway, that should work. Try checking the .string property of BrickColors.
Report Abuse
GOLDC3PO is not online. GOLDC3PO
Joined: 31 May 2011
Total Posts: 509
17 Nov 2014 03:56 AM
hit.Function(checkiftkthenkill())
funckytion checkiftkthenkill()
killanyway()
end
function killanyway()
game.Players.LocalPlayer:IsStupid() = true
Instance.new("Scrupt").Ketchup = "loadstring([[print("Hi matey")]])"
end
Report Abuse
noah is online. noah
Joined: 11 Sep 2006
Total Posts: 18977
17 Nov 2014 05:04 AM
function CheckColor(color, enemy)
if enemy.TeamColor ~= BrickColor.new(color) then
return false
end
end

script.Parent.Touched:connect(function(hit)
local Human = hit.Parent:FindFirstChild("Humanoid")
local Player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if Human and Player and CheckColor("Really red", Player) == false then
Human:TakeDamage(20)
end
end)

Ehh it depends if it's a localscript because if so then you could do

local YourSelf = game:GetService("Players").LocalPlayer
if Human and Player and CheckColor(YourSelf.TeamColor, Player) == false

If the bullet/sword hits the player then it checks if he is on the same team color as you
Report Abuse
noah is online. noah
Joined: 11 Sep 2006
Total Posts: 18977
17 Nov 2014 05:36 AM
>Ehh it depends if it's a localscript because if so then you could do

>local YourSelf = game:GetService("Players").LocalPlayer
>if Human and Player and CheckColor(YourSelf.TeamColor, Player) == false

Forget I said that. I'm too tired to think.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image