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

How am I supposed to make these parameters work even though they're in separate scripts?

I'm using parameters with a remote event so that it can transfer info from client to server, but for some reason, I still get a red line in the script (marked with a note.)

Local Script Line

PunchHit:FireServer(hit.Parent)

Server Script Line

local function PunchHit(player,hit.Parent) -- the ".Parent" line here gets a red line
end

PunchHit.OnServerEvent:Connect(PunchHit)

How can I fix this and make it work from separate scripts?

1 comment

0

I think that when you pass through parameters you can't reference the parent immediately, because it's meant to receive the parameter

1 answer

local function PunchHit(player,v) print(v)
end

PunchHit.OnServerEvent:Connect(PunchHit)

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