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

Is this script broken or is the remote event not working?

Asked by 5 years ago
Edited 5 years ago

Local script

function Pieper()
        if workspace.ambulancemembers:FindFirstChild(game.Players.LocalPlayer.Name) then
        script.Parent.Parent.Enabled = true
        wait(15)
        script.Parent.Parent.Enabled = false
    end
end
game:GetService("ReplicatedStorage").CallAmbu.OnClientEvent:Connect(Pieper)

This is in a GUI Localscript

requested = false
script.Parent.InputBegan:connect(function(t)
    if t.UserInputType == Enum.UserInputType.MouseButton1 and not requested then
        requested = true
        game.ServerStorage.Dead.Value = game.Players.LocalPlayer.Name
        game:GetService("ReplicatedStorage").CallAmbu:FireServer()
        script.Parent.Text = "Ambulance is requested"
    end
end)

This is in a GUI to I did this but it isn't working no anyone who is in that folder don't see the GUI?

0
You never set `requested` back to false at the end of the second script. I suppose if you're only able to request once then that's ok, but just wanted to point that out. Also, can you upload an image of the hierarchy or something so we know what the obscure script.Parent.Parent is? thebayou 441 — 5y
0
That’s a screengui script.parent.parent MaxDev_BE 55 — 5y

Answer this question