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

RemoteEvent not receiving request?

Asked by 7 years ago

Hello.

I'm trying to make a GUI button that, when clicked, will change your character into a classic Roblox baby.

Here is the LocalScript inside the button:

1storage = game:GetService("ReplicatedStorage")
2local event = storage.Events.PlayerToBaby
3 
4script.Parent.MouseButton1Click:connect(function()
5    event:FireServer()
6    print("Request sent.")
7end)

And here is the Script inside the RemoteEvent:

01script.Parent.OnServerEvent:connect(function(player)
02    print("Request received.")
03    local char = player.Character
04    for i in char do
05        if char[i]:IsA("BasePart") and char[i].Size == Vector3.new(1,2,1) then
06            char[i].Transparency = 1
07        end
08    end
09    local mesh = Instance.new("SpecialMesh", char:FindFirstChild("Torso"))
10end)

The only output I get is "Request sent." Why?

Please help. It is very crucial to my fame, fortune, and chocolate milk!

0
I honestly don't see anything incorrect, check your explorer and make sure everything "navigates" correctly. Tomstah 401 — 7y
0
I was able to resolve the problem by changing the parent of the server-side script. Thank you, Tomstah. Fireorius 51 — 7y

Answer this question