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

[UNANSWERED] Errors with Remove Events, only working in studio help?

Asked by 9 years ago

Ok, so I'm making this quest game and when you click this character a GUI is suppose to pop up using a ClickDetector and a RemoveEvent the problem is I keep getting an errors that my script can't fire the RemoveEvent even though it does in studio.

Heres the Code in my ClickDetector script:

function onClicked(player)
    local playerclicked = player.Name
    print("clicked")
    script.Parent.RemoteEvent:FireServer(playerclicked)
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
script.Parent.Parent.Head.ClickDetector.MouseClick:connect(onClicked)
script.Parent.Parent["American Cowboy"].ClickDetector.MouseClick:connect(onClicked)

Getting the error: FireServer can only be called from the Client

Please help

0
Change 'FireServer' to 'FireClient', and add the player argument. So, ":FireServer(player, playerclicked)" DigitalVeer 1473 — 9y
0
Getting a different error now OnClientEvent can only be used on the client Warfaresh0t 414 — 9y

Answer this question