Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to call a RemoteFunction to the Client with a ClickDetector?

I've been trying to call a brick inside of the Workspace to display a GUI on the character with RemoteFunction and FilteringEnabled. I've been attempting to find a way, but I haven't. I also tried RemoteEvent, but I might've not used them correctly either. Is there a way I can get these scripts to work with one of those? I have a RemoteFunction named 'Opened_Shop' inside of ReplicatedStorage. Please help?

A regular Inside a part in the Workspace with a ClickDetector:

local clickDetector = script.Parent.ClickDetector

clickDetector.MouseClick:connect(function(player)
	function game.ReplicatedStorage.Opened_Shop.ClientInvoke(player)
	end
end)

Local script inside the Client's Gui with a Frame:

function game.ReplicatedStorage.Opened_Shop.OnClientInvoke(player)
script.Parent.ShopGui.Options:TweenPosition(UDim2.new(0.5,-200,0.5,-200), Out, "Sine",1, false)
end

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.