I made a Goal-Line Technology script, there's 3 scripts used all together.
FOR MORE INFORMATION, visit my profile: iJava7 and join the "Goal-Line Technology BETA Testing" game.
Basically there's 3 scripts, here they are below, the Anti-Spam won't work for some reason, could you possibly help me and fix this. -- I'm an advanced beginner script. This script plays the "Goal" sound, remember that the scripts are inside of a Part, and when a part named either "Ball" or "TPS" touches the Goal-Line technology Part, it activates the scripts.
Script 1:
script.Parent.Touched:connect(function(otherPart) if otherPart.Name == "TPS" or otherPart.Name == "Ball" then if script.Parent.Size.y <5 and script.Parent.Size.x <5 and script.Parent.Size.z <5 then script.Parent.Boing.Pitch = 1 end if script.Parent.Size.y >4 and script.Parent.Size.y <9 and script.Parent.Size.x >4 and script.Parent.Size.x <9 and script.Parent.Size.z >4 and script.Parent.Size.z <9 then script.Parent.Boing.Pitch = 0.8 end if script.Parent.Size.y >8 and script.Parent.Size.y <13 and script.Parent.Size.x >8 and script.Parent.Size.x <13 and script.Parent.Size.z >8 and script.Parent.Size.z <13 then script.Parent.Boing.Pitch = 0.6 end if script.Parent.Size.y >12 and script.Parent.Size.x >12 and script.Parent.Size.z >12 then script.Parent.Boing.Pitch = 0.4 end script.Parent.Goal:Play() end end)
Script 2:
script.Parent.Touched:connect(function(otherPart) if otherPart.Name == "TPS" or otherPart.Name == "Ball" then if game.Workspace.TimeMSG.Value > 2 then wait(4) game.Workspace.TimeMSG.Value = 0 else cloneat = script.MessageScript:clone() cloneat.Parent = game.Workspace cloneat.Disabled = false game.Workspace.TimeMSG.Value = game.Workspace.TimeMSG.Value + 1 end end end)
The Child Of Script 2:
m = Instance.new("Message") m.Parent = Workspace m.Text = "Goal!" wait(4) m:Destroy() script:remove()
How the Anti-Message-Spam script works: There is an IntValue in Workspace named TimeMSG, the value of it is 0.
game.Workspace.TimeMSG.Value = game.Workspace.TimeMSG.Value + 1
The command above is the Anti-Spam-Script that manages the TimeMSG (IntValue), this isn't working, please help.
FOR MORE INFORMATION, visit my profile: iJava7 and join the "Goal-Line Technology BETA Testing" game.
The 'Child of Script 2' is activated when either the parts, "TPS" or "Ball" touch the Brick that's inside the goal (The Goal-Line Technology), this activates a "Goal Sounds" and also the message script.
If you repeatadly kick the ball in, it should stop it from blinding you, (Spamming the screen), but it doesn't.