Advertisement
crabb

test_server

Aug 27th, 2019
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. local plr = game.Players.ages_dreamcast
  2. local char = plr.Character plr.CharacterAdded:wait()
  3. local root = char:WaitForChild("HumanoidRootPart")
  4. local hum = char:WaitForChild("Humanoid")
  5.  
  6. -- misc funcs
  7. local cororesume = function(c,...)
  8.   local args = {...}
  9.   local suc,err = pcall(function() coroutine.resume(c,unpack(args)) end)
  10.   print(suc,err)
  11.   return suc,err
  12. end
  13.  
  14. local new_obj = function(class,props,dur)
  15.   local nobj = Instance.new(class)
  16.   for i,v in next,props do nobj[i] = v end
  17.   if dur then debris:AddItem(nobj,dur) end
  18.  
  19.   return nobj
  20. end
  21.  
  22. -- coros
  23. local main_coro = coroutine.create(function()
  24.   local p = new_obj("Part",{
  25.     CFrame = root.CFrame
  26.   },5)
  27.   p.Parent = workspace
  28. end)
  29.  
  30. -- main
  31. coroutine.resume(main_coro)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement