I'm really new to scripting, So this is probably gonna make people cringe.
What I've been doing: I've been trying to make a script that involves remote events.
What's the goal?: I'm trying to make it so that a brick (Or a piece of Toast, In my case) That spawns on the player when the E keybind is pressed.
What's the issue?: As you know, You need a local script to use a keybind, But I would like it so that everyone can see the brick (Or Toast).
What are my scripts so far?: Script A (LocalScript):
local object = game.Workspace.ToasT
local clonedObject = object:Clone()
local repStorage = game.GetService("ReplicatedStorage")
local remote = repStorage:WaitForChild("Remote")
local Key = 'E'
game:GetService("UserInputService").InputEnded:connect(function(input,IsTyping)
if IsTyping then return end
if input.KeyCode == Enum.KeyCode[Key] then
remote:FireServer()
wait(1)
end
end)
Script B (Normal Script)
local object = game.Workspace.ToasT
local Position = game.StarterPlayer.StarterCharacter.Head.Toaster.Position
local ClonedObject = object:Clone()
local repStorage = game.GetService("ReplicatedStorage")
local remote = repStorage:WaitForChild("Remote")
remote.OnServerEvent:Connect(function(player)
ClonedObject.Position = Vector3.new(Position)
end)
Please help.

4 comments
what does it shows in output?
Line 7, Bad Argument? (Script B)
Isnt that in script A?
because this: "if IsTyping then return end" looks suspicious sinse you had to return something. Put "if IsTyping then return nil end" just for sure.