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: Scripting quiz for me

Previous Thread :: Next Thread 
xKillerGuy18x is not online. xKillerGuy18x
Joined: 07 Oct 2012
Total Posts: 216
21 Aug 2015 01:54 PM
I am a beginner at scripting (well, somewhat) and I need a few tests from you guys. Give me something to script that would be intermediate/somewhat simple, please.
Report Abuse
Barbariancreep is not online. Barbariancreep
Joined: 23 Nov 2012
Total Posts: 1096
21 Aug 2015 02:01 PM
what method would you use to move a models cframe?
Report Abuse
71428 is not online. 71428
Joined: 06 Aug 2015
Total Posts: 339
21 Aug 2015 02:02 PM
Spawn an identical clone of your player nearby including all the items
Report Abuse
xKillerGuy18x is not online. xKillerGuy18x
Joined: 07 Oct 2012
Total Posts: 216
21 Aug 2015 02:16 PM
:MoveTo()


a = game.Workspace.Player:Clone()
Report Abuse
Ripepperoni is not online. Ripepperoni
Joined: 04 Jul 2010
Total Posts: 5715
21 Aug 2015 02:17 PM
both wrong lmao
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
21 Aug 2015 02:20 PM
k simple questoin,
How do you find the center vector of a brick?

while true do the do
Report Abuse
DABOSS2798 is not online. DABOSS2798
Joined: 04 Apr 2014
Total Posts: 311
21 Aug 2015 02:24 PM
After you said all that stuff I just realised I have a lot to learn. I have a super simple one though! How do you change the transparency of a brick?
Report Abuse
xKillerGuy18x is not online. xKillerGuy18x
Joined: 07 Oct 2012
Total Posts: 216
21 Aug 2015 02:30 PM
@Peasant
Don't know ;(

And for the other person,
er
rly
Report Abuse
MiniNob is not online. MiniNob
Joined: 14 May 2013
Total Posts: 822
21 Aug 2015 02:32 PM
-_- brick.Position
Report Abuse
FinTheBuild is not online. FinTheBuild
Joined: 18 Aug 2015
Total Posts: 513
21 Aug 2015 02:32 PM
Remake Twisted Murderer
jk
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
21 Aug 2015 02:33 PM
Here's a fun one, create an environment in which this is possible;

a = 1
b = 1
print(a + b) --> 3
Report Abuse
CscLambda is not online. CscLambda
Joined: 09 Nov 2014
Total Posts: 46
21 Aug 2015 03:12 PM
function realprint(val)
print(val)
end
function print(val)
realprint(val+1)
end

a = 1
b = 1
print(a + b) --> 3


Yes? No?
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
21 Aug 2015 03:40 PM
No.

You need to change the environment, and not edit print.
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
21 Aug 2015 03:41 PM
@thedestroyer, tell me how

while true do the do
Report Abuse
myactivetestplace is not online. myactivetestplace
Joined: 11 Jul 2015
Total Posts: 3733
21 Aug 2015 03:44 PM
Me too
Report Abuse
myactivetestplace is not online. myactivetestplace
Joined: 11 Jul 2015
Total Posts: 3733
21 Aug 2015 03:50 PM
a = 1
b = 1
print(a + b + a + b - a)

there
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
21 Aug 2015 05:14 PM
It involves metatables and setfenv.

If you still can't figure it out, I'll write up an example.
Report Abuse
71428 is not online. 71428
Joined: 06 Aug 2015
Total Posts: 339
21 Aug 2015 05:17 PM
local a = {v = 1}
local b = {v = 1}
local metatable = {
__add = function (atable, btable)
return {v = atable.v + btable.v + 1}
end
}

setmetatable(a, metatable)
setmetatable(b, metatable)

print((a + b).v) --> 3

is the closest I got
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
21 Aug 2015 05:18 PM
If anyone can't figure it out in about half an hour - hour i'll post the solution
Report Abuse
FiveCakes is not online. FiveCakes
Joined: 15 Feb 2012
Total Posts: 5604
21 Aug 2015 05:23 PM
whoa expertz

How many cakes sir? Five please.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
21 Aug 2015 06:04 PM
local NewEnvironment = {print = print, rawset = rawset, setfenv = setfenv}

setmetatable(NewEnvironment, {
__newindex = function(Tab, Index, Value)
if type(Value) == "number" then
local NewValue = {Value}
setmetatable(NewValue, {
__add = function(T1, T2)
return T1[1] + T2[1] + 1
end,
})
rawset(Tab, Index, NewValue)
else
rawset(Tab, Index, Value)
end
end
})

setfenv(1, NewEnvironment)

a = 1
b = 1
print(a + b) --> 3
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
21 Aug 2015 06:09 PM
eww
Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
21 Aug 2015 06:13 PM
make a statue of me(I have a model in my models) and make it walk around and have people praise it.
Report Abuse
myactivetestplace is not online. myactivetestplace
Joined: 11 Jul 2015
Total Posts: 3733
21 Aug 2015 06:14 PM
@714 you might as well have just done what i did
Report Abuse
awotn is not online. awotn
Joined: 01 Nov 2014
Total Posts: 226
21 Aug 2015 06:19 PM
lol why would you remake an environment for something so simple.

a = 1
b = 1
local print = function(x)
print(x+1)
end
print(a+b)
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