|
| 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 |
|
|
|
| 21 Aug 2015 02:01 PM |
| what method would you use to move a models cframe? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 21 Aug 2015 02:16 PM |
:MoveTo()
a = game.Workspace.Player:Clone()
|
|
|
| Report Abuse |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 21 Aug 2015 02:30 PM |
@Peasant Don't know ;(
And for the other person, er rly
|
|
|
| Report Abuse |
|
|
MiniNob
|
  |
| Joined: 14 May 2013 |
| Total Posts: 822 |
|
| |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 21 Aug 2015 03:40 PM |
No.
You need to change the environment, and not edit print. |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2015 03:41 PM |
@thedestroyer, tell me how
while true do the do |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Aug 2015 03:50 PM |
a = 1 b = 1 print(a + b + a + b - a)
there |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 15 Feb 2012 |
| Total Posts: 5604 |
|
|
| 21 Aug 2015 05:23 PM |
whoa expertz
How many cakes sir? Five please. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 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 |
|
|
|
| 21 Aug 2015 06:14 PM |
| @714 you might as well have just done what i did |
|
|
| Report Abuse |
|
|
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 |
|
|