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: Help?

Previous Thread :: Next Thread 
HeavenLogin is not online. HeavenLogin
Joined: 26 Jun 2014
Total Posts: 265
06 Mar 2016 09:37 PM
Why doesn't this work?

I have a thing that sets the async -- foostore:SetAsync(player.Name .. "_stuff", 1)
--This works fine


And this script that doesn't work when players join

local foostore = game:GetService("DataStoreService"):GetDataStore("FooStore")

function PlayerAdded(player)
if foostore:GetAsync(player.Name .. "_stuff", 1) then
player:Kick()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
06 Mar 2016 09:40 PM
Try implementing some print statements to make sure it actually calls the event.

function PlayerAdded(player)
print("Player has been added")
if foostore:GetAsync(player.Name .. "_stuff", 1) then
print("Async is equal to 1")
player:Kick()
end
end
game.Players.PlayerAdded:connect(PlayerAdded)

if print("Async is equal to 1") doesn't rpint then your if statement is not true.



Report Abuse
HeavenLogin is not online. HeavenLogin
Joined: 26 Jun 2014
Total Posts: 265
06 Mar 2016 09:42 PM
mmk well it doesn't get the async
Report Abuse
HeavenLogin is not online. HeavenLogin
Joined: 26 Jun 2014
Total Posts: 265
06 Mar 2016 10:12 PM
help
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