|
| 04 Mar 2015 08:54 PM |
So, I continued with the script i was working on, I dont know what the problem is this time but it is simply not working, No errors show in the output so i dont know, Do you?
local CD = script.Parent
upgradecost = 5 dist = 3
enabled = true
local function onMouseClick(Player) local p = game.Players:getChildren() for i = 1, #p do local gold =p[i].leaderstats:findFirstChild("Gold") if (p[i].Name ~= script.Owner.Value) then if gold.Value > upgradecost or gold.Value == upgradecost then if (p[i].Character.Torso.Position - script.Parent.Parent.Position).magnitude < dist then if not enabled then return end enabled = false gold.Value = gold.Value - upgradecost local m = math.random(1,(2)) if m == 1 then game.ServerStorage:FindFirstChild("Cheese"):clone().Parent = p[i].Backpack print 'You Got Some Cheese!' end if m == 2 then game.ServerStorage:FindFirstChild("Steel_Sword"):clone().Parent = p[i].Backpack print 'You Got A Steel Sword!' end
local Xplode = Instance.new("Explosion") Xplode.Parent = Workspace Xplode.Position = script.Parent.Parent.Position Xplode.BlastPressure = 0 Xplode.BlastRadius = 1 Xplode.ExplosionType = "NoCraters" game.Workspace.Chest_Lvl1:remove() enabled = true end end end end end CD.MouseClick:connect(onMouseClick) |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 04 Mar 2015 08:59 PM |
| Unless roblox fixed the issue while I was gone, clickdetectors don't work anymore because of that filteringenabled thing |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 09:01 PM |
| The detectors were working before. |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 04 Mar 2015 09:04 PM |
You can't connect to client's stuff (i.e. GUIs) through them. So guis, leaderstats, backpack, and tools can't be accessed via clickdetectors.
That's what I meant to say, sorry for the confusion |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 09:05 PM |
| Eeegh, What do you thing i could do, It kinda revolves around clicking xd |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
| |
|
|
| 04 Mar 2015 09:07 PM |
| I also have no idea on how to use SurfaceGui's with this.. |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 04 Mar 2015 09:09 PM |
It's the same concept with additional stuff:
1) It's like regular GUIs, only it's on a surface of a brick 2) It's local like other GUIs, but the adornee must be set to the brick 3) You use a different event since it's a gui (MouseButton1Click) |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 09:14 PM |
| Also you have to use commandbar to set adornee or in your script cant be set in explorer though |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2015 09:30 PM |
| I'm hopeless at this, Someone mind helping me x.x |
|
|
| Report Abuse |
|
|