#i dont know why but when i did the script right (by a youtube video) it doesnt work
1 messages · Page 1 of 1 (latest)
local GameId = "7299550346"
function Touched(Player)
local FromChar = game.Players:GetPlayerFromCharacter(Player.Parent)
if FromChar then
local TeleService = game:GetService("TeleportService")
TeleService:Teleport(GameId,FromChar)
end
end
script.Parent.Touched:Connect(Touched)
local badgeID = 4127270935249505
local badgeService = game:GetService("BadgeService")
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
badgeService:AwardBadge(plr.UserId, badgeID)
end
end)
the first script is the when touched it teleports to a subplace
the second script is when touched you get a badge
idk but i think it might be that GameId is a string
try changing it from local GameId = "7299550346" to local GameId = 7299550346
He trying make it game give a player the badge
wait was there an error in the output
was there an error in the console?
i kow what badges are but were there any errors
If that was error describe it say in studio output
??
was there an error in studio output
after trying to do what u were doing and it didnt work
What kind error
take a picture of your studio output after clicking play and doing what triggers the script
im not sure wym
I mean they just started!
they js started scripting?
Sound like it
wait did u follow a yt tutorial or did someone make the script for u?
but either way i think the reason you dont have the badge is that your game isnt published
The title say it all
ur game has to be published to get badges
Fr see in game
okay well i think this will be solved if u publish ur game to roblox?
@tiny mountain
I meant seen received badge in game
His name slicer
wait so briefly explain the problem ur having
k ill search him up but re-explain the problem ur having i dont quite understand
Understand
In todays video I show you how to make a game teleporter in Roblox Studio
Hope you enjoyed the video, Have a lovely rest of your day!
If you are a bit confused what to do, Feel free to message me on Discord and Ill help you out!
IRL Floppy Merch : https://itzfloppyfish.myshopify.com
Script:
local GameId = "1234567890" -- Change this ID to the...
In todays video I show you how to make a player receive a badge when a part is touched!
Hope you enjoyed the video, Have a lovely rest of your day!
If you are a bit confused what to do, Feel free to message me on Discord and Ill help you out!
Script:
local badgeID = 1234567890 -- Change this ID YOUR badge ID
local badgeService = game:GetServic...
i copy and pasted the script
and added to an uncollidable part
that can query and touch
so i basically added the two scripts into the uncollidable part
so it could teleport people and give a badge aswell
did u change the game id, the badge id, and did u publish the game @tiny mountain
no its the same badge
and game
if its the same badge and game id as the video, then u have found the problem
you have to change the badge id to a badge of ur choice that u own
and you have to change the game id to the place id of the game you want to teleport to
i did i changed it and it still doesnt work
is the game published tho?
I found issues now -- 1: the GameId needs to be a number, not a string. Second of all, you should award the badge in the Touched function, but before the player gets teleported
also you have to be in actual roblox
to get the badge
Yes and it is a number yes it should award and I tried it in the actual Roblox
@cinder flower everything is good but it still doesn't give a badge
How is going on the process going @cinder flower
slicer what is code look like
local badgeID = 4127270935249505 only line correct rest of it is wrongs
local BadgeService = game:GetService("BadgeService")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
local success, hasBadge = pcall(function()
return BadgeService:UserHasBadgeAsync(player.UserId, BADGE_ID)
end)
if success and not hasBadge then
pcall(function()
BadgeService:AwardBadge(player.UserId, BADGE_ID)
end)
end
end) in ServerScriptService
it isnt a string
@dull marten
@cinder flower
so it should be a string
local Players = game:GetService("Players")
local BadgeService = game:GetService("BadgeService")
local BADGE_ID = 2152968894 -- your badge ID
Players.PlayerAdded:Connect(function(player)
-- Run in a safe protected call
local success, hasBadge = pcall(function()
return BadgeService:UserHasBadgeAsync(player.UserId, BADGE_ID)
end)
if success then
if not hasBadge then
-- Award the badge safely
pcall(function()
BadgeService:AwardBadge(player.UserId, BADGE_ID)
print("Badge awarded to " .. player.Name)
end)
else
print(player.Name .. " already has the badge")
end
else
warn("Failed to check badge for " .. player.Name)
end
end)
just replace with your badge id
wait but look
At the video it says that the badge service:award badge has a orange line
award they when a new player join the game
that are different types of badges with their own objectives
only get it 1 times