|
| 18 Jul 2015 09:19 AM |
I wanted to make a script that if I click on an union named "worker" and that if I click somewhere else while I am the "master" of the union it would move the part. Can anyone help please?
--Here the script
Worker = script.Parent BodyPos = Worker:FindFirstChild("BodyPosition")
Lock = 0
local Player = game.Players.findFirstChild(Master.Value) local Mouse = Player:GetMouse()
Worker.ClickDetector.MouseClick:connect(function (click) Master = Worker:FindFirstChild("Master") wait(0.1) Play = game.Players:FindFirstChild(Master.Value) wait(0.1) Stats = game.Players.Play:FindFirstChild("UserStats") wait(0.1) Name = game.Players.Play.Stats:FindFirstChild("Name") wait(0.1) if Name.Value == Master.Value then if Lock == 0 then Lock = 1 wait(0.5) Mouse.Button1Down:connect(function(clickdown) local ClickBox = Instance.new("Part") ClickBox.Name = ClickBox ClickBox.Parent = Worker ClickBox.CFrame = CFrame.new(Mouse.Hit.p) BodyPos.Position = ClickBox.Position wait(0.1) Lock = 0 ClickBox:Destroy() end) end end end)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Jul 2015 09:55 AM |
| STOP IGNORING AND ANSWER PLEASE -BUMP- |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 18 Jul 2015 10:28 AM |
| I GOTTTA BUMP HOW MANY TIME |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2015 10:43 AM |
| BUMP BUMP BUMP TILL THEY ANSWER BUMP BUMP BUMP |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2015 10:47 AM |
| GOTTA BUMP THIS UP TILL THEY ANSWER BUMP BUMP BUMP OH YEAH YOU BUMP |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2015 10:53 AM |
| game.Workspace.ColonySimulator:remove() |
|
|
| Report Abuse |
|
|
| |
|