![]() ![]() Update your LocalScript to fire the RemoteEvent, so that the blocks are created on the server. local createBlockEvent = ĬreateBlockEvent.OnServerEvent:Connect(function(player, name, cframe) Next, create a Script in the Workspace or ServerScriptService that observes the RemoteEvent. ![]() One easy way of doing this is to use RemoteEvents to communicate from your LocalScript up to a Script.įirst, create a RemoteEvent somewhere like ReplicatedStorage, and give it a descriptive name like CreateBlockEvent. You just need to move the logic that creates the blocks into a Script. If you were to test this code using Studio's Test > Client and Servers > Start Local Server feature, you'll see that the blocks are only being created on the client, and in the server's view of the world, the blocks simply don't exist.īut, the fix for this is pretty easy. So since you have a serverside Script observing the contents of the Folder, it never sees any new blocks being added. The issue is that the code that spawns the blocks is located in a LocalScript.Ĭhanges made to the world in a LocalScript are not replicated to the server nor other players. Thing that adds parts to blocks folder local mouse = :GetMouse() If not children:FindFirstChild("BreakDown") and children.Name ~= "setup" then Local cd = Instance.new("ClickDetector", children) If not children:FindFirstChild("ClickDetector") and children.Name ~= "setup" then There is one problem: when I run this script, its doing absolutely nothing and outputs nothing, script location in folder and its checks same folder. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |