|
| 22 Jul 2015 11:08 AM |
Server:
local Clicked = script.Parent:WaitForChild("Clicked")
local Debounce = false
Clicked.OnServerEvent:connect(function(Plr,Args) if Debounce == false then Debounce = true local Hint = Instance.new("Hint",workspace) Hint.Text = Plr.Name.." cloned a part" local Brick = Args[1]:Clone() Brick.Parent = workspace Brick.CFrame = Args[1].CFrame*CFrame.new(0,Args[1].Size.Y,0) wait(.1) Hint:Destroy() Debounce = false end end)
Client:
local Clicked = script.Parent:WaitForChild("Clicked")
local Bin = script.Parent
Bin.Equipped:connect(function(Mouse) Mouse.Icon = "rbxasset://textures\\GunCursor.png" Mouse.Button1Down:connect(function() if Mouse.Target ~= nil and Mouse.Target.Locked == false and Mouse.Target:IsA("BasePart") then local Target = Mouse.Target Clicked:FireServer(Bin.Parent.Parent,{Target}) end end) end)
Error:
10:07:50.634 - 1 is not a valid member of Workspace 10:07:50.635 - Script 'Players.Player.Backpack.Clone.CloneToolServer', Line 10 10:07:50.635 - Stack End |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2015 11:10 AM |
Please space it before you post a text wall. You apparently went workspace.1 or something, but I can't tell cuz it's a text wall.
▲☭⎊▲Obama is a giant overlord space lizard▲⎊☭▲ |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2015 11:13 AM |
| it is not at all a wall of text, idiot. Also, no i didnt. I clicked a part and that should ahve been what fired. |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2015 11:15 AM |
When I post code, I'm considerate to the people that are trying to help me. Thus I space code like such: for i,v in pairs(game.Players:GetChildren()) do local w = math.random(1, 2) if w == 1 then v.TeamColor = "Bright red" else v.TeamColor = "Bright blue" end end while i < 1500 do h.Text = "Time left: " .. 1500 - i i = i + 1 wait(1) end
Instead of for i,v in pairs(game.Players:GetChildren()) do local w = math.random(1, 2) if w == 1 then v.TeamColor = "Bright red" else v.TeamColor = "Bright blue" end end while i < 1500 do h.Text = "Time left: " .. 1500 - i i = i + 1 wait(1) end
▲☭⎊▲Obama is a giant overlord space lizard▲⎊☭▲ |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2015 11:19 AM |
^ So you're saying you don't tab your code? You do realize that is a bad thing and makes code less readable, right?
Also the problem with your code is that you do this:
Clicked:FireServer(Bin.Parent.Parent,{Target})
When it should be:
Clicked:FireServer(Bin.Parent.Parent,{Mouse.Target})
Although I'm not sure why you're putting it in a table when there is only one object. |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2015 11:19 AM |
| thats not being considerate at all. what i did is called indenting/ |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Jul 2015 11:20 AM |
No, of course I tab my code in. But I prefer to give it in that slightly organised format than a heap of words and mathematical functions. ▲☭⎊▲Obama is a giant overlord space lizard▲⎊☭▲ |
|
|
| Report Abuse |
|
|