#SOLVED TYSM

116 messages · Page 1 of 1 (latest)

late zenith
#

here it just doesnt work

#

NEED HELP PLEASE!

rose chasm
#

it's a local script, firstly

#

change it to a server script

shy finch
#

which is why you need to change it to a server script

hasty etherBOT
#

studio** You are now Level 5! **studio

late zenith
#

alr ima try

shy finch
#

I thought you were the op for a sec 😭 mb

rose chasm
#

@late zenith

late zenith
#

it worked tysm

#

but now it just dissappears lmao not even in the inventory

rose chasm
#

not a character

late zenith
#

oh

#

okay ima try to fix it but tysm for your help

rose chasm
#

local player = Players:GetPlayerFromCharacter(character)

#

@late zenith

#

put local Players = game:GetService("Players") in the first line

late zenith
#

like this? it works but i get an error with the Player

hasty etherBOT
#

studio** You are now Level 1! **studio

rose chasm
#

it's Players

#

add an s

late zenith
#

oh so like this then? wait ill try it out rq

late zenith
#

it dissappeard on me again lmao

rose chasm
#

wait no

rose chasm
#

it's not the character

#

wait can you just paste the script here?

#

@late zenith

late zenith
#

sure

#

wait ima put into txt file

rose chasm
#

alr

late zenith
#

or normal?

rose chasm
#

normal

late zenith
#

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)

rose chasm
#

alr

late zenith
#

ill just do both

rose chasm
#
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

late zenith
#

alr ill try it

#

should i do a wait before it loads maybe?

#

nvm doesnt solve it

rose chasm
#

wait

#

give me a minute

late zenith
#

alr

rose chasm
#
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

late zenith
#

I cant bro I swear my studio be bugging or smth 😭

rose chasm
#

wait

#

is brick a Tool?

late zenith
#

nah its just a normal part

rose chasm
#

okay then wait

rose chasm
#

add a tool

late zenith
#

in the part right?

rose chasm
#

put the brick and script inside it

late zenith
#

oh ok

#

like this right?

rose chasm
#

yea

#

wait no

#

undo it

#

@late zenith

late zenith
#

okay

hasty etherBOT
#

studio** You are now Level 2! **studio

rose chasm
#

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```
late zenith
#

alr im tying

#

trying*

#

no tool right?

#

or with tool?

rose chasm
#

no tool

late zenith
#

okay

rose chasm
#

im creating a new instance of it

late zenith
#

uhhh yeah i honestly just give up at this point bro but thx for trying to help me idk what it is with this

rose chasm
#
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

late zenith
#

I just tried getting into studio and fail at this basic thing 😭

#

alr ima try

#

oh that worked tysm

rose chasm
#

actually?

late zenith
#

ye

rose chasm
#

show img

late zenith
#

ill just add a little wait thing but thats awesone tysm

rose chasm
#

😭

#

no problem

late zenith
#

are u some pro coder though? because u do seem quite good tbh

rose chasm
#

also you dont have to create a new instance of a tool, you can just create a tool inside a folder and stuff

rose chasm
#

i just learn from helping people

#

and reading roblox docs

late zenith
#

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

rose chasm
#

oh

late zenith
#

but that was actually so bad in every way like no actual tutorials on their cpp and so i quit it

rose chasm
#

lua/luau is my only language

#

just start with lua/luau first

#

cause it's the easiest language

#

half of it is english

late zenith
#

yeah well i can do still some of it but i am just missing the exprerience with it ig

rose chasm
#

ye

late zenith
#

i mean c and cpp which i learned are so different

#

it gets me confused every time

rose chasm
#

just keep solving errors and practicing by creating new projects

late zenith
#

like i try to do stuff like std::cout even though its just print 😭

late zenith
#

but yeah tysm again and have a wondeful day/night