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

These scripts work only in the studio, not in the actual game, any solutions?

Asked by
Echtic 128
5 years ago

Here's the local script:

script.Parent.MouseButton1Click:Connect(function()


    workspace.Events.h1:FireServer()


end)

Here's the server script:

wait()
script.Parent.OnServerEvent:Connect(function(player)

    player.Character.Head.h:Destroy()

        wait()

    local h1 = game.ReplicatedStorage.Hairs.h1:Clone()
    h1.Name = "h"
    h1.Parent = player.Character.Head

    local weld = Instance.new("Weld")
    weld.Parent = h1
    weld.Part0 = player.Character.Head
    weld.Part1 = h1
    weld.C0 = CFrame.new(0,0,0)
    weld.C1 = CFrame.new(0,-0.5,0)



end)
0
How does it not work? Does it throw an error, or does it not execute? Try putting print("sending") in the local script and then print("received") in the server script, and see if both print out RiskoZoSlovenska 378 — 5y
0
The output is completely clear plus it does work but only in the studio. Echtic 128 — 5y
0
try putting the remote event in replicated storage theking48989987 2147 — 5y
0
If the RemoteEvent is in workspace, it should already be replicated. Maybe the actual game hasn't been updated? (ROBLOX is sometimes slow with applying your changes to the actual game.) oilsauce 196 — 5y

Answer this question