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: Why this hide and seek script dont work

Previous Thread :: Next Thread 
Xkrew is not online. Xkrew
Joined: 06 Dec 2013
Total Posts: 1044
21 Dec 2013 05:12 AM
it dont show the Info of game like wait time.


local maps = game.Lighting.Maps:GetChildren()
local pickedMap = nil
local plyrs = 2-- least amount of players needed to play
local it = nil -- nothing
local PlayerItName = game.Workspace.PlayerItName
local ViewItTrueorFalse = game.Workspace.ViewIt
info=Workspace.InfoReel

function round(a,b)
return math.floor((a/b)+0.5)*b
end

function findAlive()
local alive = 0
local playerLIST = game.Players:GetChildren()
for i = 1, #playerLIST do
if playerLIST[i].Alive.Value == true then
alive = alive + 1
end
end
local total = 28/alive
local p = round(total,1)
print("Round Total: "..p)
local playerLIST = game.Players:GetChildren()
for i = 1, #playerLIST do
if playerLIST[i].Alive.Value == true then
playerLIST[i].leaderstats.Points.Value = playerLIST[i].leaderstats.Points.Value + p
end
end
if alive == 0 then
game.Workspace.Vic:Play()
info.Value= it.Name.. " tagged everyone. "
wait(4)
game.Workspace.Vic:Stop()
info.Value= it.Name.." gets a bonus of 30 points!"
wait(5)
if it ~= nil then
it.leaderstats.Points.Value = it.leaderstats.Points.Value + 30
wait(2)
end
end
local list = game.Players:children()
for i = 1, #list do
if list[i].Character ~= nil then
list[i].Character:BreakJoints()
end
end
pickedMap:remove()
local minutes = 0
local seconds = 50
for i = 1, (minutes+1) do
for i = 1, (seconds+1) do
if seconds < 10 then
info.Value= minutes..":0"..seconds.." till next round!"
else
info.Value= minutes..":"..seconds.." till next round!"
end
seconds = seconds - 1
wait(1)
end
seconds = 59
minutes = minutes - 1
end
CheckPlayers()
end


function ItCountDown()
local walls = game.Workspace:GetChildren()
for i = 1,#walls do if walls[i].className == "Part" then walls[i].Transparency = 0 end end
local minutes = 4 -- how many minutes it has to find everyone
local seconds = 59 -- how many seconds it has to find everyone
for i = 1, (minutes+1) do
for i = 1, (seconds+1) do
if seconds < 10 then
info.Value= minutes..":0"..seconds.." left for " ..it.Name.. " to find players!"
else
info.Value= minutes..":"..seconds.." left for " ..it.Name.. " to find players!"
end
seconds = seconds - 1
wait(1)
end
seconds = 59
minutes = minutes - 1
end
info.Value= "Round Over"
game.Workspace.GameStarted.Value = false
game.Workspace.Win:Play()
game.Workspace.Dee:Stop()
wait(5)
game.Workspace.Win:Stop()
PlayerItName.Value = ""
ViewItTrueorFalse.Value = false
findAlive()
end

function Teleport_It()
if it ~= nil then
if it.Character ~= nil then
if it.Character.Humanoid.Health > 0 then
head = it.Character.Head
newhead = head:Clone()
neck = it.Character.Torso.Neck
newneck = neck:Clone()
newhead.Name = "NewHead"
newhead.Parent = it.Character
newneck.Name = "NewNeck"
newneck.Part0 = it.Character.Torso
newneck.Part1 = newhead
newneck.Parent = it.Character.Torso
head.Transparency = 1
head.face:Remove()
it.Character.Humanoid.WalkSpeed = 18
tt = game.Lighting.BillboardGui:clone()
tt.Parent = it.Character
local s = game.Lighting.ItScript:clone()
s.Parent = it.Character
s.owner.Value = it.Name
game.Lighting:findFirstChild(""):clone().Parent = it.Backpack
game.Lighting:findFirstChild("Fake It[2]"):clone().Parent = it.Backpack
game.Lighting:findFirstChild("Flashlight[4]"):clone().Parent = it.Backpack
local location = pickedMap.Spawns.ItSpawn
it.Character.Torso.CFrame = CFrame.new(Vector3.new(location.Position.x,location.Position.y + 3,location.Position.z))
wait(0.2)
end
end
ItCountDown()
else
info.Value= It.Name.. " left the game!"
wait(2)
info.Value= "Re-Starting game!"
wait(2)
local list = game.Players:children()
for i = 1, #list do
if list[i].Character ~= nil then
list[i].Character:BreakJoints()
list[i].Alive.Value = false
game.Workspace.GameStarted.Value = false
end
end
CheckPlayers()
end
end


function HideCountDown()
local minutes = 1 -- how many minutes hiders have to hide
local seconds = 59-- how many seconds hiders have to hide
for i = 1, (minutes+1) do
for i = 1, (seconds+1) do
if seconds < 10 then
info.Value= minutes..":0"..seconds.." left to hide."
else
info.Value= minutes..":"..seconds.." left to hide."
game.Workspace.GameStarted.Value= true
end
seconds = seconds - 1
wait(1)
end
seconds = 59
minutes = minutes - 1
end
info.Value= "Ready or not here " ..it.Name.. " comes!"
wait(2)
game.Workspace.Dee:Play()
Teleport_It()
end

function Choose_It()
local list = game.Players:GetChildren()
local f = 1
local random = math.random(30,45)
for i = 1, random do
it = list[f]
info.Value= "Choosing to be It: "..it.Name
f = f + 1
if f > #list then
f = 1
end
wait(0.2)
end
info.Value= it.Name.." has been chosen to be It!"
game.Workspace.Tada:Play()
wait(4)
game.Workspace.Tada:Stop()
PlayerItName.Value = it.Name
ViewItTrueorFalse.Value = true
Start()
end

function Start()
local po = game.Workspace:GetChildren()
for i = 1,#po do
if po[i].Name == "Trap" or po[i].Name == "It " then
po[i]:remove()
end
end
local players = game.Players:GetChildren()
local spawns = pickedMap.Spawns:GetChildren()
local d = 1
for x = 1, #players do
if players[x] ~= it then
if players[x].Character ~= nil then
if players[x].Character.Humanoid.Health > 0 then
players[x].Alive.Value = true
players[x].Character.Head.Transparency = 1
info.Value= "Preparing "..players[x].Name
local location = spawns[d]
game.Lighting.ViewItGUI:clone().Parent = players[x].PlayerGui
players[x].Character.Torso.CFrame = CFrame.new(Vector3.new(location.Position.x,location.Position.y + 3,location.Position.z))
wait(0.2)
end
end
end
d = d + 1
if d > #spawns then
d = 1
end
end
local walls = game.Workspace:GetChildren()
for i = 1,#walls do if walls[i].className == "Part" then walls[i].Transparency = 0 end end
info.Value= "All Hiders Ready!"
game.Workspace.Ahh:Play()
wait(2)
info.Value= "Hiders, Start Hiding!!!"
wait(3)
game.Workspace.Ahh:Stop()
HideCountDown()
end

function Choose_Level()
local pM = maps[math.random(1, #maps)]
pickedMap = pM:clone()
pickedMap.Parent = game.Workspace
info.Value= "The Map is "..pickedMap.Name
wait(6)
local time = 5
for i = 1, time do
info.Value= "Choosing 'It' in "..time
time = time - 1
wait(1)
end
Choose_It()
end

function CheckPlayers()
if game.Players.NumPlayers < plyrs then
info.Value= "Not enough players"
wait(1)
CheckPlayers()
else
info.Value= "Enough Players!"
wait(1.3)
info.Value= "Choosing Map..."
wait(1)
info.Value= "Choosing Map.."
wait(1)
info.Value= "Choosing Map."
wait(1)
Choose_Level()
end
end

wait(1)
CheckPlayers()
Report Abuse
Vaporation is not online. Vaporation
Joined: 08 Jun 2011
Total Posts: 1397
21 Dec 2013 05:31 AM
The output is your friend.
Report Abuse
Xkrew is not online. Xkrew
Joined: 06 Dec 2013
Total Posts: 1044
21 Dec 2013 05:36 AM
local info = game.Workspace:findFirstChild("InfoReel")
function news(Value)
print("News update!")
script.Parent.Text = info.Value
end
if info ~= nil then
script.Parent.Text = info.Value
info.Changed:connect(news)
end
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
21 Dec 2013 05:38 AM

function news()
local info = game.Workspace:findFirstChild("InfoReel")
if info then
print("News update!")
script.Parent.Text = info.Value
info.Changed:connect(news)
end
end

news()
Report Abuse
Xkrew is not online. Xkrew
Joined: 06 Dec 2013
Total Posts: 1044
21 Dec 2013 05:41 AM
I only see text at InfoReel.Value

and i dont see any text at StarterGui.InfoGUI.InfoTab.Text
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
21 Dec 2013 05:43 AM
this script have to be in infobox or whatever you have
Report Abuse
Xkrew is not online. Xkrew
Joined: 06 Dec 2013
Total Posts: 1044
21 Dec 2013 05:57 AM
lol i change info=Workspace.InfoReel to info=StarterGui.InfoTab.Text

and I change info.Value to info but still not work.
Report Abuse
Xkrew is not online. Xkrew
Joined: 06 Dec 2013
Total Posts: 1044
21 Dec 2013 06:00 AM
pls i really need to fix it i build the map so hard
Report Abuse
Xkrew is not online. Xkrew
Joined: 06 Dec 2013
Total Posts: 1044
21 Dec 2013 06:03 AM
The problem is "StarterGui.InfoGUI.InfoTab.Text" dont copy the text at "Workspace.InfoReel.Value"
Report Abuse
Xkrew is not online. Xkrew
Joined: 06 Dec 2013
Total Posts: 1044
21 Dec 2013 06:05 AM
I already put this script in the InfoTab

local info = game.Workspace:findFirstChild("InfoReel")
function news(Value)
print("News update!")
script.Parent.Text = info.Value
end
if info ~= nil then
script.Parent.Text = info.Value
info.Changed:connect(news)
end
Report Abuse
Xkrew is not online. Xkrew
Joined: 06 Dec 2013
Total Posts: 1044
21 Dec 2013 06:33 AM
Nope now i know how to solve it
Report Abuse
Xkrew is not online. Xkrew
Joined: 06 Dec 2013
Total Posts: 1044
21 Dec 2013 06:52 AM
I change teh gui to hint
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