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 » Scripting Helpers
Home Search
 

Re: AAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAA

Previous Thread :: Next Thread 
GamesKeith is not online. GamesKeith
Joined: 28 Jul 2014
Total Posts: 2261
03 Aug 2014 05:36 PM
4th thread on this
please help



local creditsds = game:GetService("DataStoreService"):GetDataStore("Credits")

if creditsds:GetAsync("Credits_"..player.Name) then
credits.Value = creditsds:GetAsync("Credits_"..player.Name)
end

credits.Changed:connect(function(val)
creditsds:SetAsync(credits.Value, val)
end)

14:11:11.027 - Workspace.Main:88: attempt to index upvalue 'creditsds' (a nil value)
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
03 Aug 2014 05:37 PM
Is credits.Value changing?
Report Abuse
Juddily is not online. Juddily
Joined: 24 Aug 2008
Total Posts: 4243
03 Aug 2014 05:38 PM
And what is 'val?'
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
03 Aug 2014 05:39 PM
^ Val is the value that changed, it is returned in the .Changed event.

@Games

which line is 88?
Report Abuse
GamesKeith is not online. GamesKeith
Joined: 28 Jul 2014
Total Posts: 2261
03 Aug 2014 05:40 PM
"Is credits.Value changing?"

it breaks on line 88 so no
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
03 Aug 2014 05:45 PM
Can I see the entire script?

Also is it a script or localscript?
Report Abuse
GamesKeith is not online. GamesKeith
Joined: 28 Jul 2014
Total Posts: 2261
03 Aug 2014 06:00 PM
script in workspace

full script is a complete irrelevant gamescript

playeradded

game.Players.PlayerAdded:connect(function(player)

player.TeamColor = BrickColor.new("Dark stone grey")

local stats = Instance.new("IntValue", player)
stats.Name = "leaderstats"

local credits = Instance.new("IntValue", stats)
credits.Name = "Credits"

local win = Instance.new("BoolValue", player)
win.Name = "Win"

local alive = Instance.new("BoolValue", player)
alive.Name = "Alive"

for i, v in pairs(admins) do
if string.lower(player.Name) == v then

end
end

--[[repeat wait() until game.Players[player.Name]:FindFirstChild("Backpack")
local tool = game.ReplicatedStorage.Tool:Clone()
tool.Parent = game.Players[player.Name].Backpack
]]

if creditStore:GetAsync(player.userId) ~= nil then
credits.Value = creditStore:GetAsync(player.userId)
else
credits.Value = 0
end

repeat wait() until player.Character

local humanoid = player.Character.Humanoid

credits.Changed:connect(function(val)
creditStore:SetAsync(player.userId,credit.Value)
end)

humanoid.Died:connect(function()
if round then
player.Alive.Value = false
print(player.Alive.Value)
player.Win.Value = false
end
end)

end)
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
03 Aug 2014 06:04 PM
Uhh, where is the part you were originally asking about in the script? It looks like you replaced it with creditStore which you never set to be anything...?
Report Abuse
GamesKeith is not online. GamesKeith
Joined: 28 Jul 2014
Total Posts: 2261
03 Aug 2014 06:05 PM
yeah in another thread someone told me to do that

same error

pretend it didn't change
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
03 Aug 2014 06:13 PM
Use pcall on it and make a message if it errors then upload it to one of your places and test it. From my little amount of research I have found you have to use it on an uploaded place.
Report Abuse
GamesKeith is not online. GamesKeith
Joined: 28 Jul 2014
Total Posts: 2261
03 Aug 2014 06:16 PM
do i use pcall() or ypcall() i forget

also wouldnt a server be the same???
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
03 Aug 2014 06:20 PM
I googled it and someone solved their similar problem just by doing it in a public game. I'm not 100% sure it would fix it but do you have a better idea? Might as well try it.

As for the pcall thing, just use pcall.
Report Abuse
GamesKeith is not online. GamesKeith
Joined: 28 Jul 2014
Total Posts: 2261
03 Aug 2014 07:20 PM
hm

ill try it thanks
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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