bin = script.Parent function onTouched(part) workspace.OBJCONTROL.Obj1:FireServer() workspace.TALKCONTROL.Talk1:FireServer() end connection = bin.Touched:connect(onTouched)
I have this script in a part in the workspace, and it is a LocalScript. It gives the the error message, FireServer can only be called from the client. The Remote Event is in a folder in the workspace too, and that connects to a GUI that allows it to change text,
game.workspace.TALKCONTROL.Talk1.OnServerEvent:connect(function(change) script.Parent.TextLabel.Text='The servers are running fine. Weird..' wait(7) script.Parent.TextLabel.Text='' end) game.workspace.TALKCONTROL.Talk2.OnServerEvent:connect(function(change) script.Parent.TextLabel.Text='Maybe I should look for co-workers.' wait(4) script.Parent.TextLabel.Text='' end) game.workspace.TALKCONTROL.NPC.NPCT1.OnServerEvent:connect(function(change) script.Parent.TextLabel.Font="SourceSans" script.Parent.TextLabel.Text="What's going on?!" wait (3) script.Parent.TextLabel.Text='' wait (3) script.Parent.TextLabel.Text="Is anyone else here?" wait (3) script.Parent.TextLabel.Text='' wait (3) script.Parent.TextLabel.Text="I'll look for others, you should look for an exit." wait (3) script.Parent.TextLabel.Text='' wait (3) script.Parent.TextLabel.Text="I will. Bye." game.Workspace.OBJCONTROL.Obj3_5:FireServer() wait (3) script.Parent.TextLabel.Text='' end) game.workspace.TALKCONTROL.Talk3.OnServerEvent:connect(function(change) script.Parent.TextLabel.Font="SourceSansItalic" script.Parent.TextLabel.Text='None of the lab guys are here today. Weird.. Maybe I should check the Announcement board.' wait (4) script.Parent.TextLabel.Text='' end) game.workspace.TALKCONTROL.Talk4.OnServerEvent:connect(function(change) script.Parent.TextLabel.Text="A bombing?? I gotta get outta here!" wait (4) script.Parent.TextLabel.Text='' end)
Please help. Also, if I am not clear enough, do let me know.
The LocalScript should just be a regular script. Simple as that.
You can simply move the local script from the part into the the StarterPack. Then re-edit the code like:
bin = game.Workspace.(name of the part) --You should rename the part so you can find it bin.Touched:connect(function() workspace.OBJCONTROL.Obj1:FireServer() workspace.TALKCONTROL.Talk1:FireServer() end)