I’ve scripted a remote event to activate when a certain key is being pressed. upon the first test, I noticed that the script was not working yet there were no errors. In order to find my source of the problem, I put a print statement to tell me when the script has gone through the line of codes. I finally found the source and it was the remote. For some odd reason, the remote is not sending its signals to the server. I found this out when the print statement I had at the beginning was not printing in the output. How can I fix this?
[Local Script]
print ("P1")
local Remote = game.ReplicatedStorage.SpriteDiveRemote
--local YunoFolder = YunoFolder:WaitForChild("meshes")
print ("P3")
local UIS = game:GetService("UserInputService")
local x1 = false
print ("P4")
UIS.InputBegan:Connect(function(Input,GP)
if GP then return end
if Input.KeyCode == Enum.KeyCode.B and not x1 then
x1 = true
print "B0"
Remote:FireServer()
print "B00"
wait(60)
x1 = false
end
end)
[Server Script]
print ("11")
local Remote = game.ReplicatedStorage.SpriteDiveRemote
local YunoFolder = game.ReplicatedFirst:WaitForChild("Yuno")
local BodyParts = YunoFolder.meshes
local TweenService = game:GetService("TweenService")
print "B1"
--Script Start
Remote.OnServerEvent:Connect(function(Plr)
local plr = game.Players.LocalPlayer or Plr
local Character = plr.Character or plr.CharacterAdded:Wait()
local RightFoot = Character:WaitForChild("RightFoot")
--Body Parts
local UpperArm = BodyParts.URight
local MiddleArm = BodyParts.MRight
local Hand = BodyParts.BRight
local Wings = BodyParts.Wings
local Halo = BodyParts.Halo
print "B2"
--Body Parts Ends here
--Meshes
local BottomWind = BodyParts.BottomWind
print "B3"
--Meshes Ends here
--TweenServices Start
local WingSwirlInfo = TweenInfo.new(2.1,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,4,false,0)
local BottomWindTween = TweenService:Create(BottomWind,WingSwirlInfo,{Orientation = CFrame.fromOrientation(0,360,0)})
print "B4"
--TweenServices ENd
--scripty
print ("Dive!")
end)
[Game File]
SpiritDiveSupport.rbxl (70.1 KB)