|
| 01 Nov 2015 12:24 AM |
are you srs roblox? heres the script
fpvon = false controlsopen = false
function fpvclick() if fpvon == false then workspace.CurrentCamera.CameraType = "Attach" --game.Players.LocalPlayer.CameraMaxZoomDistance = 0 workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.InspireTool.Inspire1.lens workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.InspireTool.Inspire1.lens --workspace.CurrentCamera.CameraType = "Custom" script.Parent.fpv.Text = "FPV View (on)" fpvon = true elseif fpvon == true then game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid game.Workspace.CurrentCamera.CameraType = "Custom" script.Parent.fpv.Text = "FPV View (off)" game.Players.LocalPlayer.CameraMaxZoomDistance = 400 fpvon = false end end
function controlsclick() if controlsopen == false then script.Parent.controlsgui:TweenPosition(UDim2.new(0.75, 0,0.25, 0), "InOut", "Quad", 1) script.Parent.controlsgui:TweenSize(UDim2.new(0.23, 0,0.5, 0), "InOut", "Quad", 1) script.Parent.button:TweenPosition(UDim2.new(0.75,0,0.15,0), "InOut", "Quad", 1) script.Parent.controlsgui.controls.TextTransparency = 0 controlsopen = true elseif controlsopen == true then script.Parent.controlsgui:TweenPosition(UDim2.new(0.75, 0,0.75, 0), "InOut", "Quad", 1) script.Parent.controlsgui:TweenSize(UDim2.new(0.23, 0,0.0, 0), "InOut", "Quad", 1) script.Parent.button:TweenPosition(UDim2.new(0.75, 0,0.65, 0), "InOut", "Quad", 1) wait (.8) script.Parent.controlsgui.controls.TextTransparency = 1 controlsopen = false end end script.Parent.fpv.Mousebuttonton1Click:connect(fpvclick) script.Parent.button.Mousebuttonton1Click:connect(controlsclick)
BEEP BEEP HERE COMES THE MEME CREEP |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:26 AM |
"script.Parent.fpv.Mousebuttonton1Click:connect(fpvclick)"
What is a Buttonton? |
|
|
| Report Abuse |
|
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 01 Nov 2015 12:27 AM |
"script.Parent.fpv.Mousebuttonton1Click:connect(fpvclick)"
You misspelled the event, it should be MouseButton1Click and you wrote Mousebutton1Click. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:28 AM |
@guy who said buttoton good point it was a mistake of ctrl h i guess
BEEP BEEP HERE COMES THE MEME CREEP |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:29 AM |
Yeah, thanks for blaming roblox for your crap/misspellt code, like everyone else new to this subforum does.
Not to be rude but... ever thought it's a mistake in your code and not roblox at fault |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:29 AM |
ok now im getting this error
01:28:50.144 - button is not a valid member of ScreenGui 01:28:50.145 - Script 'Players.Player1.Backpack.InspireTool.DJIGui.LocalScript', Line 39 01:28:50.146 - Stack End
and button is in the same parent of fpv
BEEP BEEP HERE COMES THE MEME CREEP |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:30 AM |
| Can you point out what section of the code is erroring? |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:31 AM |
line 39
BEEP BEEP HERE COMES THE MEME CREEP |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:31 AM |
or right at the very end (line 39)
BEEP BEEP HERE COMES THE MEME CREEP |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:32 AM |
LocalScripts will normally run before many game objects have actually loaded in. Use WaitForChild() to wait for instances to load.
script.Parent:WaitForChild("fpv")MouseButton1Down:connect(fpvclick) script.Parent:WaitForChild("Button")MouseButton1Down:connect(controlsclick) |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:35 AM |
so here are the end lines now:
script.Parent:WaitForChild("fpv").MouseButton1Click:connect(fpvclick) script.Parent:WaitForChild("button").button.MouseButton1Click:connect(controlsclick)
and now it just outputs the same thing that button isn't a valid member of screengui exept right when the game starts
BEEP BEEP HERE COMES THE MEME CREEP |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:36 AM |
Whoops.. get rid of that extra ".button" after WaitForChild
script.Parent:WaitForChild("button").MouseButton1Click:connect(controlsclick)
|
|
|
| Report Abuse |
|
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 01 Nov 2015 12:39 AM |
| Make sure all the names are spelled correctly, pointers are case-sensitive. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2015 12:43 AM |
@long thats i owe you big time if you wanted to know what i was scripting it was this: http://www.roblox.com/games/315409441/drone-test-place
BEEP BEEP HERE COMES THE MEME CREEP |
|
|
| Report Abuse |
|
|