I need your help because the script won’t find the child even though its there
Script:
local Handle = script.Parent.Handle
local Tool = script.Parent
local Yeet = script.Parent.Yeet
local Players = game:GetService("Players")
Tool.Activated:Connect(function()
print("clicked")
Yeet:FireServer(Players.LocalPlayer.Character)
end)

Error:
You’re getting the RemoteEvent Yeet from the client, so you need to wait for it to replicate. Use WaitForChild instead of the dot operator.
Edit:
Example:
local Yeet = script.Parent:WaitForChild("Yeet")
3 Likes
And, in the future, make sure you do this for all objects when localizing them in scripts for the first time.
ex.
local Handle = script.Parent:WaitForChild("Handle") --Not necessary to wait for the parent since the child wouldn't exist if the parent didn't
2 Likes