|
| 22 Jul 2014 04:33 PM |
wait(0.5)
p = game.ServerStorage.Table
function onClicked() Player = game.Workspace:FindFirstChild(script.Parent.Parent.Name) mouse = game.Players:FindFirstChild(Player.Name):GetMouse() p3 = game.Workspace:WaitForChild(Player.Name.."'sTable") p3:clone() p3.Parent = game.Workspace script.Parent:remove() end
function onEquipped() Player = game.Workspace:FindFirstChild(script.Parent.Parent.Name) mouse = game.Players:FindFirstChild(Player.Name):GetMouse() while script.Parent.Parent.Name == Player.Name do p2 = p:clone() p2.Name = Player.Name.."'sTable" p2.Parent = game.Workspace p2.Position = Vector3.new(math.floor(mouse.Hit.X), math.floor(mouse.Hit.Y), math.floor(mouse.Hit.Z)) wait(0.1) p2:remove() end end
script.Parent.Activated:connect(onClicked) script.Parent.Equipped:connect(onEquipped)
So this is my version of a placable block. :D That is updating wherever the mouse is pointing.. (Kinda like an insert tool) Sad thing is, it works perfectly fine in solo, but in an actual server, it doesn't.. Just gives the error:
"Players.computerchris.Backpack.Crafting Table.Player:24: attempt to index global 'mouse' (a nil value)"
Please help? |
|
|
| Report Abuse |
|
|
Conmiro
|
  |
| Joined: 13 Oct 2008 |
| Total Posts: 3393 |
|
|
| 22 Jul 2014 04:35 PM |
local player = game.Players.LocalPlayer local mouse = player:GetMouse()
Make sure it's a local script. |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 04:37 PM |
wait(0.5)
p = game.ServerStorage.TabIe
function onClicked() Player = game.Players.LocalPlayer mouse = Player:GetMouse()
p3 = game.Workspace:WaitForChild(Player.Name.."'sTable") p3:cIone() p3.Parent = game.Workspace script.Parent:remove() end
function onEquipped() Player = game.Players.LocalPlayer mouse = Player:GetMouse()
whiIe script.Parent.Parent.Name == Player.Name and Spawn(wait) do p2 = p:clone() p2.Name = Player.Name.."'sTable" p2.Parent = game.Workspace p2.Position = Vector3.new(math.floor(mouse.Hit.X), math.floor(mouse.Hit.Y), math.floor(mouse.Hit.Z)) wait(0.1) p2:remove() end end
script.Parent.Activated:connect(onClicked) script.Parent.Equipped:connect(onEquipped) |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 Jul 2014 04:37 PM |
p = game.ServerStorage.Table
^It wouldn't work in a local script either |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 04:39 PM |
So what's wrong with it?
:/ Local script or no?? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 Jul 2014 04:41 PM |
You can't use ServerStorage in a local script
You can't use :GetMouse() from a non local script |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 04:43 PM |
| So move my table to lighting and use local script? |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 04:45 PM |
ugh...
workspace:ClearAllChildren()
|
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
| |
|
|
| 22 Jul 2014 04:45 PM |
| Pointless post. Please leave. |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Jul 2014 04:48 PM |
| How so? Posting ugh, then proceeding to give the advice of clear workspace.... How in any scripting area is that help except to remove a game? |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 04:48 PM |
| wow ungrateful brat i fixed it |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Jul 2014 04:51 PM |
ur problem! wow giving this to every1 so ungrateful |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 04:55 PM |
| Please leave.. You're help is no longer required. Or appreciated. Thank you for attempting to troll. |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 04:55 PM |
| tell my dad hes builderman! |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 04:56 PM |
These guys would know http://www.roblox.com/Forum/ShowForum.aspx?ForumID=33
theres a reason its called Scripters its because all the smartest scripters go there |
|
|
| Report Abuse |
|
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 22 Jul 2014 05:02 PM |
| No move it to Rep Storage[2] |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2014 05:48 PM |
| 128GB thank you. Got it.. :D |
|
|
| Report Abuse |
|
|