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 » Scripters
Home Search
 

Help, I'm a novice.

Previous Thread :: Next Thread 
legosonic411 is not online. legosonic411
Joined: 12 Mar 2009
Total Posts: 3660
17 Dec 2015 02:48 PM
Not too sure where I'm going wrong, trying to make a multi point terminal.
I have three capture points with a script like this in it, inside the brick itself is also a BoolValue that should be changed when someone touches it

local Owner

script.Parent.Touched:connect(function(hit)
Player = game.Players:GetPlayerFromCharacter(hit.Parent)
if Player ~= nil then
if hit.Parent.Humanoid.Health <= 0 then return end
Owner = Player.TeamColor
end
end)

if Owner == BrickColor.new("Bright yellow") then
script.Parent.PointA.Value = true
elseif Owner == BrickColor.new("Bright red") then
script.Parent.PointA.Value = false
end


Then elsewhere there's a script that determines how many BoolValues are at what value.

local TermA = script.Parent.HillA.PointA
local TermB = script.Parent.HillB.PointB
local TermC = script.Parent.HillC.PointC

local score1 = 0

if TermA == false and TermB == false and TermC == false then
Score1 = 0

if TermA == false and TermB == false and TermC == true or TermA == false and TermB == true and TermC == false or TermA == true and TermB == false and TermC == false then
score1 = score1-1
end

if TermA == false and TermB == true and TermC == true or TermA == true and TermB == true and TermC == false or TermA == true and TermB == false and TermC == true then
score1 = score1+1
end
if TermA == true and TermB == true and TermC == true then
score1 = score1+3
end
end

I know it's REALLY basic, but I'm still learning.
The main problem I'm having is that the boolValue does not change when the brick is touched, it might just be a problem of me trying to store it in a BoolValue but I'd like a bit of help/advice.
Report Abuse
sonicboy01 is not online. sonicboy01
Joined: 22 Nov 2008
Total Posts: 923
17 Dec 2015 02:52 PM
The owner variable is incomplete.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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