Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

My Tool works in Studio mode, but not in Online mode. Is there something wrong with my Script?

Asked by 8 years ago
Edited 8 years ago

As the title said, I need help to configure these scripts to work "online"... I have tryied many things, but nothing worked, that is why I'm here. Please, give me a hand :D

The following scripts are a LOCK TOOL that verifies if the selected part have a IntValue of 1, then change it to locked or unlocked. Its working on Studio with no error reports on output. It just wont work at online... :(

*Representation in StarterPack

1-LockTool --> (HopperBin)
2       -LockScript -->(Script)
3       -LocalScript -->(LocalScript)

%%%%%%% LocalScript (LOCAL SCRIPT) %%%%%%%%%%

01wait(0.1)
02 
03active = false
04 
05selectionBox = Instance.new("SelectionBox")
06selectionBox.Color = BrickColor.Red()
07selectionBox.Visible = true
08 
09selectionLasso = Instance.new("SelectionPartLasso")
10selectionLasso.Color = BrickColor.Black()
11selectionLasso.Humanoid = game.Players.LocalPlayer.Character.Humanoid
12 
13gui = Instance.new("ScreenGui")
14text = Instance.new("TextLabel")
15text.Parent = gui
View all 99 lines...

%%%%%%%%% LockScript (SCRIPT) %%%%%%%%%%%%

01bin = script.Parent
02 
03function thread(func)
04    coroutine.resume(coroutine.create(func))
05end
06 
07function makeMessage(text, time)
08    print("msg")
09    thread(function()
10        local ply = bin.Parent.Parent
11        if ply then
12            local m = Instance.new("Message")
13            m.Name = "LockToolMessage"
14            m.Text = text
15            m.Parent = ply
View all 44 lines...
0
The onSelected and onButton1Down events can not use mouse while in a server script... M39a9am3R 3210 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

Try and change the LockScript to Local script and see if that works qq

(Sorry im a noob in Lua)

Ad
Log in to vote
0
Answered by 8 years ago

I'm not sure if I should, but I will try, tnx

Answer this question