Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. local function onCompleteAppFired(player)
  2.     print("submit pressed")
  3.    
  4.     local keep = game:GetService('DataStoreService'):GetDataStore('keep'):GetAsync('table')
  5.    
  6.     local Q1A = workspace.info.answers.Q1A
  7.     local Q2A = workspace.info.answers.Q2A
  8.     local Q3A = workspace.info.answers.Q3A
  9.     local Q4A = workspace.info.answers.Q4A
  10.     local Q5A = workspace.info.answers.Q5A
  11.  
  12.     keep[player.UserId] = {
  13.         ["Q1A"] = Q1A.Value,
  14.         ["Q2A"] = Q2A.Value,
  15.         ["Q3A"] = Q3A.Value,
  16.         ["Q4A"] = Q4A.Value,
  17.         ["Q5A"] = Q5A.Value
  18.         }
  19.    
  20.     DataStoreService:GetDataStore('keep'):SetAsync('table',keep)
  21.    
  22.     -----------------------
  23.    
  24.     local keep = game:GetService('DataStoreService'):GetDataStore('keep'):GetAsync('table') --reload for test
  25.    
  26.     print(keep[player.UserId]["Q1A"])
  27.    
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement