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: Kohl's Admin 4.0

Previous Thread :: Next Thread 
RobloxianBuilder369 is not online. RobloxianBuilder369
Joined: 06 Aug 2013
Total Posts: 232
01 Mar 2014 01:43 PM
Hello, I was wondering how I would edit it to where I can open certain doors and give certain tools through the script. I see it a lot in group trainings but I never figured it out.. Please help.. I am only a beginner script.
Report Abuse
Laedere is online. Laedere
Joined: 17 Jun 2013
Total Posts: 23601
01 Mar 2014 01:44 PM
no
Report Abuse
RobloxianBuilder369 is not online. RobloxianBuilder369
Joined: 06 Aug 2013
Total Posts: 232
01 Mar 2014 01:45 PM
No?
Report Abuse
RobloxianBuilder369 is not online. RobloxianBuilder369
Joined: 06 Aug 2013
Total Posts: 232
01 Mar 2014 02:49 PM
Wait Wait, I found the give line but I don't know what I would add to give the gear...



if msg:lower():sub(1,5) == "give " then
local chk1 = msg:lower():sub(6):find(" ") + 5
local plrz = GetPlr(plr, msg:lower():sub(6,chk1-1))
for i, v in pairs(plrz) do
coroutine.resume(coroutine.create(function()
if v and v:findFirstChild("Backpack") and game:findFirstChild("Lighting") then
for a, tool in pairs(game.Lighting:children()) do
if tool:IsA("Tool") or tool:IsA("HopperBin") then
if msg:lower():sub(chk1+1) == "all" or tool.Name:lower():find(msg:lower():sub(chk1+1)) == 1 then tool:Clone().Parent = v.Backpack end
end
end
end
end))
end
end
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
01 Mar 2014 02:51 PM
The "give" command finds the tool in Lighting:

if v and v:findFirstChild("Backpack") and game:findFirstChild("Lighting") then

And then gives the player that tool if it exists.
if v and v:findFirstChild("Backpack") and game:findFirstChild("Lighting") then

What are you trying to modify?
Report Abuse
RobloxianBuilder369 is not online. RobloxianBuilder369
Joined: 06 Aug 2013
Total Posts: 232
01 Mar 2014 02:53 PM
I am trying to add tools to it.. Like I really just need 3 tool lines to start it and then I would know how to add more.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
01 Mar 2014 02:53 PM
Ohhh. You're looking for a holo. Those have their own set of commands that you won't find in Kohl's. Try looking in uncopylocked holos, or in the free models.

Or, (recommended option) you can make it yourself using a chat function.

Ex (may not work):

plr.Chatted:connect (function (msg)
if msg.lower == "open door" then
Workspace.Door.CanColllide = false
end
end)
Report Abuse
RobloxianBuilder369 is not online. RobloxianBuilder369
Joined: 06 Aug 2013
Total Posts: 232
01 Mar 2014 02:55 PM
Would you also add

game.Workspace.Door.Transparency.1

Or did I do that wrong?
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
01 Mar 2014 03:00 PM
Since you're settting a property value, you need =
Workspace.Door.Transparency = 1 -- game is optional when referring to the Workspace. It's a shortcut.
Report Abuse
RobloxianBuilder369 is not online. RobloxianBuilder369
Joined: 06 Aug 2013
Total Posts: 232
01 Mar 2014 03:01 PM
Now that makes more sense...
Report Abuse
RobloxianBuilder369 is not online. RobloxianBuilder369
Joined: 06 Aug 2013
Total Posts: 232
01 Mar 2014 03:07 PM
Output said:

14:05:24.250 - Workspace.Script:3: attempt to index global 'plr' (a nil value)
14:05:24.253 - Script 'Workspace.Script', Line 3
14:05:24.255 - stack end
14:05:24.950 - httpGet failed. Trying again. Error: Asset is not trusted for this place. Elapsed time: 0.0710555
14:05:24.955 - Content failed because Asset is not trusted for this place



Script:


plr.Chatted:connect (function (msg)
if msg.lower == "open door" then
Workspace.Door.CanColllide = false
Workspace.Door.Transparency = 1
end
end)
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
01 Mar 2014 03:13 PM
Toldja it wouldn't work. You need to define plr. Use .PlayerAdded
Report Abuse
4colby13 is not online. 4colby13
Joined: 02 Feb 2013
Total Posts: 302
01 Mar 2014 03:16 PM
I would suggest putting the script inside the door and saying script.Parent.Transparency = 1 incase there is more than 1 door named door.
Report Abuse
RobloxianBuilder369 is not online. RobloxianBuilder369
Joined: 06 Aug 2013
Total Posts: 232
01 Mar 2014 03:25 PM
I did



admins = {"Player1, RoboxianBuilders369"} --Admin names here

function isAdmin(name)
for i,v in pairs(admins) do
if name:lower() == v:lower() then return true end
end
return false
end

local door1=script.Parent
game.Players.PlayerAdded:connect(function(p)
if isAdmin(p.Name) then
p.Chatted:connect(function(msg)
if msg=="Door 1 Open" then -- Say to Open (Door 1)
door.Transparency=.0
wait (.1)
door.Transparency=.0
wait (.1)
door.Transparency=.0
wait (.1)
door.Transparency=.0
wait (.1)
door.Transparency=.0
wait (.1)
door.Transparency=10
door.CanCollide=false
elseif msg=="Door 1 Close" then -- Say again to close (Door 1)
door.CanCollide=true
door.Transparency=.0
wait (.1)
door.Transparency=.0
wait (.1)
door.Transparency=.0
wait (.1)
door.Transparency=.0
wait (.1)
door.Transparency=.0
wait (.1)
door.Transparency=0
end
end)
end
end)





And I created a part named 'door1' and t didn't work... I kinda got help from my friend on skype for part of it and he doesn't know what happened ethier...
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