#SOLVED TYSM
116 messages · Page 1 of 1 (latest)
which is why you need to change it to a server script
** You are now Level 5! **
alr ima try
I thought you were the op for a sec 😭 mb
@late zenith
thats because a backpack is in a player
not a character
local player = Players:GetPlayerFromCharacter(character)
@late zenith
put local Players = game:GetService("Players") in the first line
like this? it works but i get an error with the Player
** You are now Level 1! **
yeah because Player is not a variable
it's Players
add an s
oh so like this then? wait ill try it out rq
yes
it dissappeard on me again lmao
wait no
local player = Players:GetPlayerFromCharacter(character)
it's not the character
wait can you just paste the script here?
@late zenith
alr
or normal?
normal
local brick = script.Parent
local Players = game:GetService("Players")
local function onTouched(other)
local character = other.Parent
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
brick.Parent = Players:FindFirstChild("Backpack")
end
end
brick.Touched:Connect(onTouched)
alr
ill just do both
local brick = script.Parent
local Players = game:GetService("Players")
local function onTouched(hit)
local character = hit.Parent
local player = Players:GetPlayerFromCharacter(character)
if character then
brick.Parent = player:FindFirstChild("Backpack")
end
end
brick.Touched:Connect(onTouched)```
@late zenith
alr
local brick = script.Parent
local Players = game:GetService("Players")
local function onTouched(hit)
local character = hit.Parent
local player = Players:GetPlayerFromCharacter(character)
if character then
local brickClone = brick:Clone()
brickClone.Parent = player.Backpack
end
end
@late zenith
I cant bro I swear my studio be bugging or smth 😭
nah its just a normal part
okay then wait
in the part right?
put the brick and script inside it
okay
** You are now Level 2! **
i have a better idea
local brick = script.Parent
local Players = game:GetService("Players")
local function onTouched(hit)
local character = hit.Parent
local player = Players:GetPlayerFromCharacter(character)
if character then
local Tool = Instance.new("Tool")
local brickClone = brick:Clone()
brickClone.Parent = Tool
Tool.Parent = player.Backpack
end
end```
no tool
okay
im creating a new instance of it
uhhh yeah i honestly just give up at this point bro but thx for trying to help me idk what it is with this
dont give up
local Players = game:GetService("Players")
local function onTouched(hit)
local character = hit.Parent
if character then
local player = Players:GetPlayerFromCharacter(character)
if player then
local tool = Instance.new("Tool")
local brickClone = brick:Clone()
brickClone.Parent = tool
tool.Parent = player.Backpack
else
end
else
end
end
brick.Touched:Connect(onTouched)
try this
I just tried getting into studio and fail at this basic thing 😭
alr ima try
oh that worked tysm
actually?
ye
show img
ill just add a little wait thing but thats awesone tysm
are u some pro coder though? because u do seem quite good tbh
also you dont have to create a new instance of a tool, you can just create a tool inside a folder and stuff
no im not that good
i just learn from helping people
and reading roblox docs
thats nice
i mean i quitt roblox studio for quite some time
like a few months
and got into some other programming languages like c
and then tried my luck with UE5
oh
but that was actually so bad in every way like no actual tutorials on their cpp and so i quit it
lua/luau is my only language
just start with lua/luau first
cause it's the easiest language
half of it is english
yeah well i can do still some of it but i am just missing the exprerience with it ig
ye
just keep solving errors and practicing by creating new projects
like i try to do stuff like std::cout even though its just print 😭
yeah im coding with a friend of mine and we just try to learn lua a bit not just lua like the roblox deving in generell to make games
but yeah tysm again and have a wondeful day/night
you too