|
| 12 Oct 2013 03:05 PM |
There are no syntax errors that I see but I think there might be on the line that I have commented on. Not sure if that is it or if there are more errors that I don't see. I have tested in online mode, and it doesn't seem to work. The user variable is indeed correct ( this script is in a GUI). This script is also in a localscript:
user = script.Parent.Parent.Parent mouse = user:GetMouse() local build = Instance.new("BoolValue", user) build.Value = false build.Name = 'build' local destruct = Instance.new("BoolValue", user) destruct.Value = false destruct.Name = 'destruct'
mouse.KeyDown:connect(function(key) if key == 'b' then if build.Value == false then if destruct.Value == true then destruct.Value = false build.Value = true end elseif build.Value == true then build.Value = false end elseif key == 'd' then if destruct.Value == false then if build.Value == true then build.Value = false destruct.Value = true elseif build.Value == false then build.Value = false destruct.Value = true end elseif destruct.Value == true then destruct.Value = false end end end)
mouse.Button1Down:connect(function() if build.Value == true then local pos = mouse.Hit.p -- here? local val = user.bbucks.Value error = scirpt.Parent.errornotification if val > 0 then local part = Instance.new('Part', Workspace.CurrentCamera) part.FormFactor = 'Symmetric' part.Size = Vector3.new(2,2,2) part.BackSurface = 'SmoothNoOutlines' part.BottomSurface = 'SmoothNoOutlines' part.FrontSurface = 'SmoothNoOutlines' part.LeftSurface = 'SmoothNoOutlines' part.RightSurface = 'SmoothNoOutlines' part.TopSurface = 'SmoothNoOutlines' val = val-1 elseif val == 0 then error.TextLabel.Text = "You don't have enough Builder Bucks for that!" error:TweenPosition(UDim2.new(.35,0,.5,0)) wait(5) error:TweenPosition(UDim2.new(.35,0,-1,0)) wait() error.TextLabel.Text = "" end elseif destruct.Value == true then mouse.TargetFilter = Workspace.undeletableparts local targ = mouse.Target targ:Destroy() local val = user.bbucks.Value val = val + 1 end end)
|
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 03:14 PM |
| another note: All the players characters are local (local parts). That might be the problem... but how do I fix it! |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 03:15 PM |
Well for user I dont see why u dont put game.Players.LocalPlayer The mouse.Hit.p is correct but note it returns a vector3 |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 03:21 PM |
Ok, so I fixed that to be:
part.Position = Vector3.new(pos)
But it still didn't work. I think I know what's wrong with it, but I just need to know one thing to fix it.... Is it possible to put a part in a specific player's camera? I think I did it wrong |
|
|
| Report Abuse |
|
|
jnickib
|
  |
| Joined: 28 May 2012 |
| Total Posts: 137 |
|
|
| 12 Oct 2013 03:45 PM |
u r nuts
~It's me, 08C, on an alt for a day! |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 03:48 PM |
| Sure I am, what's your point? |
|
|
| Report Abuse |
|
|
jnickib
|
  |
| Joined: 28 May 2012 |
| Total Posts: 137 |
|
| |
|
|
| 12 Oct 2013 03:51 PM |
| Did I do anything wrong in that script? |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Oct 2013 09:43 AM |
| Seriously I need to fix this. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 13 Oct 2013 09:59 AM |
| It's supposed to make bool values in the player that signify what to do when the player clicks. If the player presses b on the keyboard, the value "build" will become true so that when the mouse clicks, it will build and not destroy things, the same thing with the d key. d will activate the remove tool. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 13 Oct 2013 12:11 PM |
| Well, I think I know how to fix my script, I just need to know how to put parts to be seen by only one specific player. I know that that would require local parts, but I just don't think I did it right. |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2013 12:38 PM |
| Seriously, does it have to be this hard to get a reply? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|