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

Previous Thread :: Next Thread 
TommyJay2003 is not online. TommyJay2003
Joined: 26 Feb 2016
Total Posts: 221
26 Jul 2017 11:31 AM
I made a script in studio where the player buys a skin pack and then they can equip it, it works fine in studio but in the actual game it takes away the money but you can't equip the skins. Can someone explain the difference between studio and the server and how I might be able to resolve this?

Thanks
Report Abuse
TommyJay2003 is not online. TommyJay2003
Joined: 26 Feb 2016
Total Posts: 221
26 Jul 2017 12:41 PM
Bump
Report Abuse
TommyJay2003 is not online. TommyJay2003
Joined: 26 Feb 2016
Total Posts: 221
26 Jul 2017 01:08 PM
I used

local player = game.Players.LocalPlayer
local leaderboard = player:WaitForChild("Money")
local button = script.Parent
local price = button:WaitForChild("Price")
local pack = player:WaitForChild("BrownRabbit")


button.MouseButton1Click:connect(function()
if leaderboard.Bounz.Value >= price.Value then
if pack.Collection.Value == 0 then
pack.Collection.Value = 1
if pack.Collection.Value == 1 then
leaderboard.Bounz.Value = leaderboard.Bounz.Value - price.Value
end
end
end
end)

Which should mean that if the Collection value is 1 then it charges, but when I do it in game and not in studio it charges but the value is 0? This is a local script in the Button GUI

I aslo used

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
local player = hit.Parent.Name
local value = game.Players:FindFirstChild(player)
if value.BrownRabbit.Collection.Value == 1 then
local m = script.Parent.Parent
local p = hit.Parent
p.Torso.BrickColor = m.Torso.BrickColor
p.Nose.BrickColor = m.Nose.BrickColor
p.EyeBall.BrickColor = m.EyeBall.BrickColor
p.EyeBall2.BrickColor = m.EyeBall2.BrickColor
p.EyeCentre.BrickColor = m.EyeCentre.BrickColor
p.EyeCentre2.BrickColor = m.EyeCentre2.BrickColor
p.InLeftEar.BrickColor = m.InLeftEar.BrickColor
p.InRightEar.BrickColor = m.InRightEar.BrickColor
p.LeftEar.BrickColor = m.LeftEar.BrickColor
p.RightEar.BrickColor = m.RightEar.BrickColor
p.LeftTooth.BrickColor = m.LeftTooth.BrickColor
p.RightTooth.BrickColor = m.RightTooth.BrickColor
p.Mouth.BrickColor = m.Mouth.BrickColor

else
print("Hi")
end
end
end)

to make the character change, but prints "Hi" which means that the Collection Value is 0. This is in a normal script in the workspace!
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
26 Jul 2017 01:11 PM
testing in play solo makes the game run locally while testing in the server runs how it's supposed to be in the real game.
Report Abuse
TommyJay2003 is not online. TommyJay2003
Joined: 26 Feb 2016
Total Posts: 221
26 Jul 2017 01:14 PM
So what should I do? Should I turn the workspace script into a local, but I think that wont work? Any suggestions?
Report Abuse
TommyJay2003 is not online. TommyJay2003
Joined: 26 Feb 2016
Total Posts: 221
26 Jul 2017 01:36 PM
I just Local server tested and it is doing the same, but the second script is working because I manually set the Collection as one and it worked, so the fault is in the first script. But the problem is it takes money away which it should only do when the Collection is one so I do not understand, if it doesn't change it then why does it charge?
Report Abuse
TommyJay2003 is not online. TommyJay2003
Joined: 26 Feb 2016
Total Posts: 221
26 Jul 2017 02:03 PM
I am so confused
Report Abuse
TommyJay2003 is not online. TommyJay2003
Joined: 26 Feb 2016
Total Posts: 221
26 Jul 2017 02:29 PM
Bump
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