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
 

Re: Time stop script

Previous Thread :: Next Thread 
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
11 Jul 2015 07:17 PM
I was working on a dio brando script that freezes all blocks in place, then unfreezes the ones not called unfreeze, e.g. everything but the baseplate. I keep getting errors since the code keeps trying to anchor non-parts, and when the script ends, even the baseplate unfreezes. Any ideas?
script.Parent.Activated:connect(function()
script.Parent.Handle.Sound:Play()
local freeze = game.Workspace:GetChildren()
for i=1, #freeze do
if freeze[i]:IsA("Part") == true then
local player = script.Parent.Parent:GetChildren()
for i=1, #player do
if player[i]:IsA("Part") == true then
player[i].Anchored = false
end
end
freeze[i].Anchored = true
wait(21.24)
if freeze[i].Name ~= "unfreeze" then
freeze[i].Anchored = false
end
end
end
end)
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
11 Jul 2015 07:34 PM
Bump
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
11 Jul 2015 07:52 PM
script.Parent.Activated:connect(function()
script.Parent.Handle.Sound:Play()
for i,v in next, workspace:GetChildren() do
if v:IsA("Part") then
local player = script.Parent.Parent
for i ,p in next, player:GetChildren() do
if p:IsA("Part") then
p.Anchored = false
end
end
v.Anchored = true
wait(21.24)
if v.Name ~= "unfreeze" then
v.Anchored = false
end
end
end
end)


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
11 Jul 2015 07:57 PM
local function freeze(p)
if p:IsA("BasePart") then
p.Anchored = true
end
for _,v in pairs(p:GetChildren())do
freeze(p)
end
end
freeze(workspace)
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
11 Jul 2015 08:06 PM
DO you guys know a way where it freezes everything BUT the player using it?
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
11 Jul 2015 08:12 PM
local froze = {}
local function freeze(p)
if p:IsA("BasePart") and p.Anchored == false then
p.Anchored = true
table.insert(froze,p)
end
if not game.Players:GetPlayerFromCharacter(p) then
for _,v in pairs(p:GetChildren())do
freeze(p)
end
end
end
local function unfreeze()
for _,v in pairs(froze)do
v.Anchored = false
end
froze = {}
end
while true do
freeze(workspace)
wait(1)
unfreeze()
end
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
11 Jul 2015 08:15 PM
local froze = {}
local function freeze(p)
if p:IsA("BasePart") and p.Anchored == false then
p.Anchored = true
table.insert(froze,p)
end
if not game.Players:GetPlayerFromCharacter(p) then
for _,v in pairs(p:GetChildren())do
freeze(v)
end
end
end
local function unfreeze()
for _,v in pairs(froze)do
v.Anchored = false
end
froze = {}
end
while true do
freeze(workspace)
wait(.5)
unfreeze()
wait(.5)
end
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
11 Jul 2015 08:23 PM
Thank you thank you oh so useful.
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
11 Jul 2015 08:26 PM
Omg its so cool everything is like the matrix XD
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
11 Jul 2015 08:35 PM
Do you know how to make the script into a tool?
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
11 Jul 2015 08:43 PM
Nvrmnd I got it to work thank you very much :)
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
12 Jul 2015 04:24 AM
Ok now I want to make the script anchor all the players in the game except for the one using the tool but I get this error instead:

local Tool = script.Parent
local Character = Tool.Parent
local Player = Players:GetPlayerFromCharacter(Character)
local Torso = Character:FindFirstChild("Torso")
local RightArm = Character:FindFirstChild("Right Arm")
local LeftArm = Character:FindFirstChild("Left Arm")
local RightLeg = Character:FindFirstChild("Right Leg")
local LeftLeg = Character:FindFirstChild("Left Leg")
local Head = Character:FindFirstChild("Head")
Torso.Anchored = false
Head.Anchored = false
RightArm.Anchored = false
LeftArm.Anchored = false
RightLeg.Anchored = false
LeftLeg.Anchored = false

02:20:40.119 - Workspace.Za Wardo.Script:38: attempt to index local 'Head' (a nil value)
02:20:40.119 - Stack Begin
02:20:40.120 - Script 'Workspace.Za Wardo.Script', Line 38 - upvalue freeze
02:20:40.120 - Script 'Workspace.Za Wardo.Script', Line 25 - upvalue freeze
02:20:40.121 - Script 'Workspace.Za Wardo.Script', Line 25 - upvalue freeze
02:20:40.121 - Script 'Workspace.Za Wardo.Script', Line 25 - upvalue freeze
02:20:40.122 - Script 'Workspace.Za Wardo.Script', Line 84
02:20:40.122 - Stack End
02:20:55.815 - Auto-Saving...
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
12 Jul 2015 04:27 AM
After that I freeze in place when I unequip the tool.
Report Abuse
iiEpikAlt1 is not online. iiEpikAlt1
Joined: 19 May 2015
Total Posts: 2155
12 Jul 2015 04:28 AM
I made a time stop script like that, too. But I gave up.
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
12 Jul 2015 04:32 AM
I dont wanna give up ;-;
Report Abuse
Egzekiel is not online. Egzekiel
Joined: 10 Jan 2011
Total Posts: 1079
12 Jul 2015 04:33 AM
This gave me an idea for Chaos Control...

script.Parent.Equipped:connect(function()
script.Parent.Activated:connect(function()
for _,v in pairs(game.Players:GetPlayers()) do
if v.Name~=game.Players.LocalPlayer.Name then
for _,i in pairs(v.Character:GetChildren()
if if:IsA("BasePart") then
i.Anchored=true
end
end
end
end
end)
end)
Report Abuse
iiEpikAlt1 is not online. iiEpikAlt1
Joined: 19 May 2015
Total Posts: 2155
12 Jul 2015 04:36 AM
Make it lock bricks that are already anchored

wait 1 second

and make it unlock everything unanchored

wait 1 second

then make it only anchor the bricks that are not locked

wait 1 second

then when you are going to unanchor, make it unanchor the ones not locked

wait 1 second

then unlock the locked bricks
Report Abuse
Egzekiel is not online. Egzekiel
Joined: 10 Jan 2011
Total Posts: 1079
12 Jul 2015 04:38 AM
^ Useless, you just have to get players, then get their character and anchor every parts.
Like i just did.
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
12 Jul 2015 04:38 AM
NVRMND!
I FINNALLY GOT IT TO WORK! (It just makes you move slower)
Check here:
http://www.roblox.com/item.aspx?id=269043343
Report Abuse
iiEpikAlt1 is not online. iiEpikAlt1
Joined: 19 May 2015
Total Posts: 2155
12 Jul 2015 04:39 AM
Move slower? As in velocity or something? That wont work on animated things like players..
Report Abuse
KasakuKun is not online. KasakuKun
Joined: 13 Jun 2011
Total Posts: 1060
12 Jul 2015 04:40 AM
I know how to make good tools. hue

so if you watn to know how to weld or blah blah jsut hit me up ig eusss
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
12 Jul 2015 04:42 AM
@iiEpikAlt1
What I ment by "Slower" I meant it keeps on anchoring you for .25th of a second, thus making it feel laggy.
Report Abuse
KasakuKun is not online. KasakuKun
Joined: 13 Jun 2011
Total Posts: 1060
12 Jul 2015 04:43 AM
say what even is ze wardo anyway
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
12 Jul 2015 04:43 AM
Nvrmnd, major problem occurs when trying to run it in regular online mode.
Report Abuse
firemomo45 is not online. firemomo45
Joined: 02 Oct 2010
Total Posts: 381
12 Jul 2015 04:45 AM
Code so far...

freez = true
Players = game:GetService("Players")
local froze = {}
local function freeze(p)
if p:IsA("BasePart") and p.Anchored == false then
p.Anchored = true
table.insert(froze,p)
end
for key, value in pairs(game.Players:GetChildren()) do
rl = value.Character:FindFirstChild("Right Leg") -- If you use Game.* I will be mad
ll = value.Character:FindFirstChild("Left Leg")
ra = value.Character:FindFirstChild("Right Arm")
la = value.Character:FindFirstChild("Left Arm")
t = value.Character:FindFirstChild("Torso")

rl.Anchored = true
ll.Anchored = true
ra.Anchored = true
la.Anchored = true
t.Anchored = true
local Tool = script.Parent
local character = game.Players.LocalPlayer.Character
local Player = game.Players.LocalPlayer
local Torso = character:FindFirstChild("Torso")
local RightArm = character:FindFirstChild("Right Arm")
local LeftArm = character:FindFirstChild("Left Arm")
local RightLeg = character:FindFirstChild("Right Leg")
local LeftLeg = character:FindFirstChild("Left Leg")
local Head = character:FindFirstChild("Head")
Torso.Anchored = false
Head.Anchored = false
RightArm.Anchored = false
LeftArm.Anchored = false
RightLeg.Anchored = false
LeftLeg.Anchored = false
end
if not game.Players:GetPlayerFromCharacter(p) then
for _,v in pairs(p:GetChildren())do
freeze(v)
end
end
end
local function unfreeze()
for key, value in pairs(game.Players:GetChildren()) do
rl = value.Character:FindFirstChild("Right Leg") -- If you use Game.* I will be mad
ll = value.Character:FindFirstChild("Left Leg")
ra = value.Character:FindFirstChild("Right Arm")
la = value.Character:FindFirstChild("Left Arm")
t = value.Character:FindFirstChild("Torso")

rl.Anchored = false
ll.Anchored = false
ra.Anchored = false
la.Anchored = false
t.Anchored = false

end
for _,v in pairs(froze)do
v.Anchored = false
end
froze = {}
end
script.Parent.Activated:connect(function()
if freez == true then
freez = false
script.Parent.Handle.Sound:Play()
script.Parent.Handle.Sound.TimePosition = 7
wait(2.8)
freeze(workspace)
wait(1.63)
script.Parent.Handle.Sound:Stop()
wait(10)
script.Parent.Handle.Sound:Play()
script.Parent.Handle.Sound.TimePosition = 14.5
wait(2.75)
script.Parent.Handle.Sound:Stop()
unfreeze()
wait(.1)
freez = true
else return end
end)

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