|
| 22 Nov 2015 12:11 AM |
My first version did not work so I made another one and still the same problem. I'm thinking roblox studio is getting dumb. Script: -- Made by Me local StartingSpeed = 16
function Clicked() local Player = game.Players.LocalPlayer.Name local DeployButton = script.Parent.DeployButton -- Giving Movement to Player After Clicked local Character = game.Workspace:WaitForChild(Player) Character.Humanoid.WalkSpeed = StartingSpeed print("Given Movement To:" .. Player) -- Disables Camera Manipulation Character.Camera.Disabled = true -- Removes SurfaceMenu Gui game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid game.Workspace.CurrentCamera.CameraType = "Custom" -- Checks For Glitchs within Player/Game if script.Parent.DeployButton == nil then print("R0B10X your dumb .-.") end if game.Workspace.Players:FindFirstChild("SlotSaves") == nil then local Slot1 = Instance.new('StringValue', game.Workspace.Players) Slot1.Name = "Slot1Owner" -- Adding More Slots Later(FutureUpdate!) end end
script.Parent.DeployButton.MouseButton1Click:connect(Clicked)
I get the same error that 'DeployButton' is not a valid member of screen gui. I checked the name of DeployButton in the Gui but it's not working. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2015 12:13 AM |
| It works in roblox studio perfectly but not in online mode |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 22 Nov 2015 12:14 AM |
| give us the exact error so we can know what line this error occurs at. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2015 12:17 AM |
22:15:51 -- DeployButton is not a valid member of ScreenGui The Text Button is actually inside the Screen Gui |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2015 12:18 AM |
http://www.roblox.com/games/141375292/ALPHA-Edge The game. The Error is in the local logs |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2015 12:18 AM |
| Press f9 in-game it usually shows the error |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2015 12:19 AM |
| I got the error earlier.-. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2015 12:20 AM |
| I know the f9 logs. I said earlier the error. I have no clue how this was an error even though i had the textbutton in the screen gui |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2015 12:23 AM |
| Because sometimes your scripts run faster than the gui objects load. Use :WaitForChild('GUIOBJECTNAME') to actually wait until the object gets loaded.. |
|
|
| Report Abuse |
|
|
| |
|
galio13
|
  |
| Joined: 20 Jul 2011 |
| Total Posts: 842 |
|
| |
|
| |
|
galio13
|
  |
| Joined: 20 Jul 2011 |
| Total Posts: 842 |
|
|
| 22 Nov 2015 01:00 PM |
I had the same problem with my Gui, solution: if u wanna describe a Textbutton in a local script dont use something like this: "local TB = script.Parent.TextButton" just use "TB = script.Parent.TextButton"
Like, in local script just use local to have values like "local money = 50"
Hope this helped if not publish this as a model and I will help :D |
|
|
| Report Abuse |
|
|