|
| 24 Jan 2015 07:46 PM |
I'm trying to make it so that when you click on the text button in a "surface gui" it spawns a car. The script works in a regular gui but not in the surface gui?
local model = game.ServerStorage.Car1 local Cash = game.Players.LocalPlayer.leaderstats.Cash function onClicked() if Cash.Value >= 50 then Cash.Value = Cash.Value - 50 local c = model:Clone() wait() c.Parent = game.Workspace c:MakeJoints() end end script.Parent.MouseButton1Down:connect(onClicked) |
|
|
| Report Abuse |
|
|
| |
|
|
| 24 Jan 2015 08:01 PM |
| You have the SurfaceGui in StarterGui or PlayerGui, right? |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 08:01 PM |
| LocalScripts won't run from workspace |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 08:02 PM |
@Jarod
Why would he have it in startergui,
its a surfacegui |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 08:03 PM |
| The surface gui is in a brick |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 08:03 PM |
| LocalScripts won't run from there |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 08:09 PM |
| Put it in StarterGui so that it is local. |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 08:11 PM |
| I put it in screengui but now it the button isn't clickable |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 08:13 PM |
| No, I mean put the SurfaceGui in StarterGui. Make sure you set its Adornee though. |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 08:17 PM |
Ok so I have the surface gui in a part.
I put the part into "startergui"
It shows up
But it's not clickable |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 08:25 PM |
Does it have a TextButton in it?
Just making sure :) |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 08:27 PM |
Yea it's the text button that isn't working,
The text button has the script and its in surface gui
The button isn't clickable when its in stater gui |
|
|
| Report Abuse |
|
|
| |
|
|
| 24 Jan 2015 11:04 PM |
1) put surfacegui in startergui (not the part, just the surfacegui) 2) paste this in command bar
game.StarterGui.SurfaceGui.Adornee = game.Workspace.Part edit "SurfaceGui" to your name of it and edit "Part" to the name of the part you want it on |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2015 11:18 PM |
I think I might wanna marry you
thank u sooooo much =DDDDDDDDDD |
|
|
| Report Abuse |
|
|
| |
|