Another simple question, I know. I'm a noob at Roblox Studio. So, I'm trying to use a Remote Function to get one Local Script to tell another Local Script to make a gui appear, which should be a simple task, but I guess I'm doing something wrong. It gives me an error code whenever I try to achieve this. What am I doing wrong?
Error Code: 15:36:52.249 - OnClientInvoke is a callback member of RemoteFunction; you can only set the callback value, get is not available 15:36:52.250 - Stack Begin 15:36:52.251 - Script 'Players.EnderGamer358.PlayerGui.StartGui.Coverup.Sequencing', Line 33 15:36:52.251 - Stack End
I am doing the communication through two Local Scripts, here is the code I'm using:
Script that's sending the signal:
P.MouseButton1Click:connect(function()
for i=1, 10 do
wait(0.05)
S.ImageTransparency = S.ImageTransparency + 0.05
T.ImageTransparency = T.ImageTransparency + 0.05
end
local G = P.Parent.Parent.Parent:WaitForChild('StartGui')
G.Coverup.Sequencing.CoverupFunc:InvokeClient()
for i=1, 10 do
wait(0.05)
S.ImageTransparency = S.ImageTransparency + 0.05
T.ImageTransparency = T.ImageTransparency + 0.05
end
P.Parent.Visible = false
end)
Script that's receiving and acting on the signal:
script.CoverupFunc.OnClientInvoke:connect(function()
P.Visible = true
P.BackgroundTransparency = 1
for i=1, 20 do
wait(0.04)
P.BackgroundTransparency = P.BackgroundTransparency - 0.05
end
workspace.CurrentCamera.CFrame = CFrame.new(207, 103, -112)
for i=1, 20 do
wait(0.04)
P.BackgroundTransparency = P.BackgroundTransparency + 0.05
end
end)

1 comment
https://scriptinghelpers.org/questions/13065/remotefunction-outputting-weird-error