Advertisement
Guest User

Thing

a guest
Nov 15th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. — ontouch set spawn to here
  2. local datastoreservice = game:GetService("DataStoreService")
  3. local spawns = datastoreservice:GetDataStore("spawns")
  4.  
  5. script.Parent.Touched:Connect(function(hit)
  6.     local humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid")
  7.  
  8.     if humanoid then
  9.         local player1 = game.Players:GetPlayerFromCharacter(hit.Parent)
  10.         spawns:SetAsync(player1.userId, script.Parent.CFrame * CFrame.new(0, 10, 0))
  11. --      printTable(player1.leaderstats:GetChildren())
  12.         player1.leaderstats:WaitForChild("Stage").Value = script.Parent.Name
  13.     end
  14. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement