|
| 07 Mar 2014 05:43 PM |
local cam = game.Workspace.CurrentCamera local DZ = script.Parent.ScreenGui.DraxorianZ.Value local MR = script.Parent.ScreenGui.MoveRight.Value local ML = script.Parent.ScreenGui.MoveLeft.Value local StarterPos = Vector3.new(12.8, 29, -4.6) local PA = Vector3.new(0.1,0,0) local Targ = nil
if DZ == true then--1) Targ = game.Workspace.Draxxarian.Targ.Position else Targ = game.Workspace.Bloxinator.Targ.Position end
cam.CameraType = "Scriptable" cam.CameraSubject = game.Workspace cam.CoordinateFrame = CFrame.new(StarterPos,Targ)
if MR == true then--1) for i = 1, 202 do cam.CoordinateFrame = CFrame.new(PA, Targ) wait (0.001) end end if ML == true then--1) for i = 1, 202 do cam.CoordinateFrame = cam.CoordinateFrame*CFrame.new(PA, Targ):inverse() wait (0.001) end end
1) Theres a problem here. Everytime that i put those values to true, nothing happens, but only if i update the script, so how i update atleast these chunks so everytime the value is set to true, it does something? |
|
|
| Report Abuse |
|
|
getkoed
|
  |
| Joined: 18 Feb 2010 |
| Total Posts: 2298 |
|
|
| 07 Mar 2014 05:44 PM |
| Things only fire once, so if stuff is changing after the script has run, it won't really do anything. In this case you should use the Changed event. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2014 05:47 PM |
Never EVER index the value as a variable tho.. Only index the object,then check the value..
Obj = thing.Value print (Obj)
script.Parent.thing.Value = 1 print (Obj) print (script.Parent.thing.Value) print(Obj) Output 0 0 1 0 ...
So use thing changed event on thing,and check things value |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2014 05:49 PM |
Example:
Obj = script.Parent.Val Obj.Changed:connect(function() if Obj.Value == valuehere then print "yep,that's it alright.." --dosomething else print("wait,that's not the value,ignore this..") end end) |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2014 05:57 PM |
so i made this: DZ.Value.Changed:connect(function () --line 7 if DZ.Value == true then Targ = game.Workspace.Draxxarian.Targ.Position else Targ = game.Workspace.Bloxinator.Targ.Position end end) now im getting an error Players.Player1.PlayerGui.LocalScript:7: attempt to index field 'Value' (a boolean value) |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 07 Mar 2014 06:04 PM |
| DZ.Changed instead of DZ.Value.Changed |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2014 06:18 PM |
| OK now everything is working fine now!!!!!!!!!!!!!!!!! atleast at solo (dam roblox, if you show me on online mode that its not working, ill punch you in da face) |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2014 06:29 PM |
| Check my profile to see what am i doing :) |
|
|
| Report Abuse |
|
|