Hello developers, today I was making a seed system like this (It is activated when you press a key):
But unfortunately everything had been done to the client and only I could see it, that’s why I created a remote event with a fire server. I created a server script and i put this code:
Server Script (Server) No full Code :
local effectRed = Instance.new("Part")
effectRed.Shape = Enum.PartType.Cylinder
effectRed.Material = Enum.Material.Neon
effectRed.Size = Vector3.new(0.37, 1.164, 32.288)
effectRed.CanCollide = false
effectRed.Anchored = true
effectRed.OnServerEvent:Connect(function(plr)
effectRed.Parent = plr.HumanoidRootPart
effectRed.Position = plr.HumanoidRootPart.Position
local info = TweenInfo.new(
0.3,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local goals =
{
Size = Vector3.new(0.37, 28.147, 32.288)
}
local makepart = TweenService:Create(effectRed,info,goals)
wait(0.01)
makepart:Play()
local info2 = TweenInfo.new(
0.3,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local goals3 =
{
Size = Vector3.new(0.37, 1.164, 32.288)
}
local makepartFinal = TweenService:Create(effectRed,info2,goals3)
wait(0.3)
makepartFinal:Play()
wait(0.1)
effectRed:Remove()
end)
And I get this error, I don’t understand it, I looked everywhere and I don’t understand the reason
Local Script (Client) : No full code
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == Enum.KeyCode.Z and redbean.Value >= 1 then
redbean.Value -= 1
redevent:FireServer()
indicator:TweenPosition(UDim2.new(0.035, 0,0.819, 0),
Enum.EasingDirection.In,
Enum.EasingStyle.Linear,
0.25
,true)
script.Sound:Play()
wait(5)
indicator:TweenPosition(UDim2.new(-0.9, 0,-0.93, 0),
Enum.EasingDirection.In,
Enum.EasingStyle.Linear,
0.25
,true)
print("Se esta usando la Red Bean! Espera 6 segundos para volverla a usar")
task.wait(6)
print("Ya puedes usar la Red Bean Bro!")
remotes.Senzu:FireServer()
end