CjInc
|
  |
| Joined: 19 Aug 2011 |
| Total Posts: 27 |
|
|
| 09 Jun 2015 11:33 AM |
| So, the GUI is now working, and when I you purchase the vehicle, it deducts 5000 from "Money," but 5000 is instantly given back, and the vehicle is stuck in the air. |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2015 11:39 AM |
script?
Also the car is probably anchored. |
|
|
| Report Abuse |
|
|
CjInc
|
  |
| Joined: 19 Aug 2011 |
| Total Posts: 27 |
|
|
| 09 Jun 2015 11:40 AM |
Well, yes, script. The GUI always worked lel. Yes, it is anchored, but all my cars are, but they still drive?
|
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jun 2015 11:42 AM |
Weird cars you have then. but don't expect them to fall if they are anchored.
Also I was asking for the script. can't really help you any further without something to look at. |
|
|
| Report Abuse |
|
|
CjInc
|
  |
| Joined: 19 Aug 2011 |
| Total Posts: 27 |
|
|
| 09 Jun 2015 11:43 AM |
| At least I don't get 6,932 lines of errors ;) |
|
|
| Report Abuse |
|
|
CjInc
|
  |
| Joined: 19 Aug 2011 |
| Total Posts: 27 |
|
|
| 09 Jun 2015 11:44 AM |
Oh! The script, yes. Here:
local model = game.Lighting:WaitForChild("Omicron") local player = game.Players.LocalPlayer local character =player.Character or player.CharacterAdded:wait() local Currency = player:WaitForChild("leaderstats"):WaitForChild("Money") local Price = 5000
function onClicked() if Currency.Value >= Price then Currency.Value = Currency.Value - Price local a = model:Clone() a.Parent = game.Workspace a:MoveTo(character.Torso.Position + Vector3.new(0,0,8)) a:MakeJoints() end end script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2015 11:45 AM |
is this a local script? is filtering enabled? |
|
|
| Report Abuse |
|
|
| |
|
CjInc
|
  |
| Joined: 19 Aug 2011 |
| Total Posts: 27 |
|
|
| 09 Jun 2015 11:47 AM |
| Local script, yes. No clue if filtering is enabled..? |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2015 11:49 AM |
| It's an attribute of the workspace. It's probably disabled if you don't know about it. |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2015 11:49 AM |
| http://wiki.roblox.com/index.php?title=FilteringEnabled |
|
|
| Report Abuse |
|
|
CjInc
|
  |
| Joined: 19 Aug 2011 |
| Total Posts: 27 |
|
| |
|
|
| 09 Jun 2015 11:55 AM |
Ah. that explains it. well small explanation: you change the variable locally. that change is sent to the ROBLOX server. because filtering is enabled the ROBLOX server denies that change and puts it back to the old variable.
two ways to fix this: - the sloppy and easy way: disable filtering - the correct but harder way: implement a good server-client model with RemoteFunctions and RemoteEvents
some more info about that: http://wiki.roblox.com/index.php?title=FilteringEnabled_with_the_Client-Server_Model http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial |
|
|
| Report Abuse |
|
|
CjInc
|
  |
| Joined: 19 Aug 2011 |
| Total Posts: 27 |
|
|
| 09 Jun 2015 12:01 PM |
I think I'll do the script, instead of disabling filtering. I disabled it, and the car came down, but it wont work at all XD
|
|
|
| Report Abuse |
|
|