Тёмный

Roblox How To | Click to pick up tool (Multiplayer) 

OnFireRobloxScripting
Подписаться 7 тыс.
Просмотров 2,1 тыс.
50% 1

Опубликовано:

 

28 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@onfirerobloxscripting
@onfirerobloxscripting 2 месяца назад
Thanks for watching! Let me know if you have any problems or have any other tutorials you want to see made!
@vipscriptsyaya
@vipscriptsyaya 2 месяца назад
you are what you eat
@The-Scary-Gamer
@The-Scary-Gamer 2 месяца назад
Hey how do I make it so it can only be clicked a limited amount of times? Like if I wanted it to be only equipped 2 tines
@onfirerobloxscripting
@onfirerobloxscripting 2 месяца назад
@@The-Scary-Gamer You would have to add a variable into the tool that keeps track of how many times it has been clicked. So using the script from the video, that would look something like this: --//Variables local tool = script.Parent.Parent --Variable for the tool local clickdetector = tool.ClickDetector --Variable for the click detector local pickupLimit = 2 -- Maximum number of pickups allowed local pickupCount = 0 -- Counter for the number of times the tool has been picked up --//Pick up clickdetector.MouseClick:Connect(function(player) --When the click detector is clicked if pickupCount < pickupLimit then local char = player.Character --Variable for the player's character if not char:FindFirstChild(tool.Name) then --Check for tool inside character if not player.Backpack:FindFirstChild(tool.Name) then --Check for tool inside character's backpack local newtool = tool:Clone() --IF checks passed then clone the tool newtool:WaitForChild("ClickDetector"):Destroy() --Destroy the click detector in the new tool newtool.Parent = player.Backpack --Put tool inside the player's backpack pickupCount = pickupCount + 1 -- Increment the counter end end else clickdetector:Destroy() -- Destroy the click detector to prevent further pickups end end) Just make sure to change the limit to what you want!
@The-Scary-Gamer
@The-Scary-Gamer 2 месяца назад
@@onfirerobloxscripting thanks man :)
@rocket-o8t
@rocket-o8t 2 месяца назад
Thanks, this helped for my game so much ❤❤
@roebloxy9986
@roebloxy9986 Месяц назад
God bless you man.
@onfirerobloxscripting
@onfirerobloxscripting Месяц назад
Thank you!
@yes-ur1qq
@yes-ur1qq Месяц назад
Hey, I’m having a problem where when I pick it up it doesn’t show up in my hand and when I disable it (basically unequip) it teleports.
@黃筱晴-e7f
@黃筱晴-e7f Месяц назад
Nice video tysm! but I'm having a problem that every time I want to click my new tool in my backpack, the new tool overlap with the original one on the ground, and my character instantly teleport to where it is. Do you know how to fix this?
@黃筱晴-e7f
@黃筱晴-e7f Месяц назад
nvm, just delete the weld in the Handle
@TheGibusPan
@TheGibusPan Месяц назад
Im having an issue where players are able to kick around the object and move it, do you have any fixes? That is the only issue EDIT: so far the only solution I've came across is putting small invisible rings around the object to prevent in from moving, and still being able to pick it up. Although I would still prefer to find another way around this.
@MaksimVelickov
@MaksimVelickov Месяц назад
I know how
@TheGibusPan
@TheGibusPan Месяц назад
@@MaksimVelickov Could I please know how you do it?
@onfirerobloxscripting
@onfirerobloxscripting Месяц назад
@@TheGibusPan try to anchor the tool but not the handle. If that doesn't work, anchor the handle too, but when you collect the tool, make sure through the code you set the cloned tool's handle's anchor to false
@TheGibusPan
@TheGibusPan Месяц назад
@@onfirerobloxscripting Thank you, but I have already found another solution, which is to make a model of the tool, that gives you the tool when clicked. But I will try that in the future to save time.
@cacagamer1821
@cacagamer1821 2 месяца назад
could you make one if there is a drag detector and a click detector? for me it isnt working with both
@onfirerobloxscripting
@onfirerobloxscripting 2 месяца назад
I don't think you can have both, because the drag detector would override the click detector. There is however, a .MouseClick function on drag detectors, which would make it function the same as a click detector. The only issue with that is if the player starts to drag something with the drag detector, when they are done, it will fire the .MouseClick function
@Kitoucher
@Kitoucher Месяц назад
Maybe you could use proximity prompt to pick up?
@cacagamer1821
@cacagamer1821 Месяц назад
@@Kitoucher yeah i was thinking about that
Далее
How to Make a Working Shop in Roblox Studio! (Part 2)
21:11
MAGIC TIME ​⁠@Whoispelagheya
00:28
Просмотров 8 млн
Wait for it 😂
00:19
Просмотров 6 млн
I Paid Fiverr Game Developers to Make the Same Game
10:25
So I tried to make a game with AI
15:31
Просмотров 18 тыс.
The Most Impressive Scratch Projects
11:00
Просмотров 5 млн
Roblox How To | Click Button for Stats
9:38
exploring the history of minecraft all in one video
39:56
Making My Roblox Game VIRAL in 24 HOURS
9:24
Просмотров 37 тыс.
How to Make a Working Shop in Roblox Studio! (Updated)
21:14
MAGIC TIME ​⁠@Whoispelagheya
00:28
Просмотров 8 млн