#I wanna make this touchpart script to an proximity prompt script

81 messages · Page 1 of 1 (latest)

pine condor
#

As you said in the explanation, if the player needs to trigger the proximity prompt to get teleported to a part. Here's the script

local T1 = workspace.T1
local Dest = workspace.Dest

T1.ProximityPrompt.Triggered:Connect(function(player)
    local humroot = player.Character:FindFirstChild("HumanoidRootPart")
    humroot.CFrame = Dest.CFrame
end)
#

Oops, sorry. The first line is not necessary.

pine condor
astral vine
pine condor
astral vine
#

sadly it didnt work

scenic ibexBOT
#

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

pine condor
astral vine
#

nope

#

it still teleports me when i touch it

pine condor
#

But you said to make a script that will teleport?

astral vine
#

uh

#

no

#

wait lemme explain

#

so i have a module

#

which teleports you with a sick fading effect

#

but

#

it happens when i touch the block and i dont want that

#

i want it to be a proximity prompt

pine condor
#

Ohh

scenic ibexBOT
#

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

astral vine
#

the module looks like this

#

and the script i sent

#

belongs to the teleport

#

thing

pine condor
#

Did you add a proximity prompt to the part? The T1 part

astral vine
#

yessir

#

and it didnt work

#

maybe we can call someone that has more knowladge?

#

if youre struggling

#

i see youre new aswell

pine condor
#

Well yeah, sorry. Just was trying to help as I just have some basic knowledge and I thought you just needed a script that will teleport. Goodluck with getting the script working.

#

Wait, I think I got it working.

#

Try this

#
local T1 = workspace.T1
local Dest = workspace.Dest
local debounce = false

T1.ProximityPrompt.Triggered:Connect(function(player)
    if debounce then return else debounce = true end
    if player.Character:FindFirstChild("Humanoid") then
        local player = game:GetService("Players"):GetPlayerFromCharacter(player.Character)
        if player then
            player.Character.Humanoid.WalkSpeed = 0

            local gui = Instance.new("ScreenGui", player.PlayerGui)
            local label = Instance.new("TextLabel", gui)
            label.Size = UDim2.new(2, 0, 2, 0)
            label.Position = UDim2.new(-0.5, 0, -0.5, 0)
            label.BackgroundColor3 = Color3.new(0,0,0)
            label.BackgroundTransparency = 1
            label.Text = ""
            while gui and label and label.BackgroundTransparency > 0 do
                wait()
                label.BackgroundTransparency = label.BackgroundTransparency - 0.01
            end
            if player then
                player.Character:MoveTo(workspace.Dest.Position)
            end
            while gui and label and label.BackgroundTransparency < 1 do
                wait()
                label.BackgroundTransparency = label.BackgroundTransparency + 0.01
            end
            if gui then
                gui:Remove()
            end
            if player then
                if player.Character:FindFirstChild("Humanoid") then
                    player.Character.Humanoid.WalkSpeed = 16
                end
            end
        end
    end
    debounce = false
end)
astral vine
#

ill try it now

#

this didnt work either

pine condor
astral vine
#

nope

pine condor
#

Ohh, wait. I think I know why

astral vine
#

alr

pine condor
#

Where are the T1 and Dest parts are located?

astral vine
#

in a module

pine condor
#

Like where exactly

#

workspace.module. . .. something like that

astral vine
#

workspace?

pine condor
#

so the fade teleporter module is in workspace? no folders no anything? Right?

astral vine
#

yea

#

i can send you the models link

#

maybe u can test it?

pine condor
#

could you please rename the module

#

so it would have no spaces

#

so it would be like Fadeteleporter

#

As you can see now that I have renamed the module it works for me. I used the model you sent.

#

also here's the fixed script

local T1 = workspace.Fadeteleporter.T1
local Dest = workspace.Fadeteleporter.Dest
local debounce = false

T1.ProximityPrompt.Triggered:Connect(function(player)
    if debounce then return else debounce = true end
    if player.Character:FindFirstChild("Humanoid") then
        local player = game:GetService("Players"):GetPlayerFromCharacter(player.Character)
        if player then
            player.Character.Humanoid.WalkSpeed = 0

            local gui = Instance.new("ScreenGui", player.PlayerGui)
            local label = Instance.new("TextLabel", gui)
            label.Size = UDim2.new(2, 0, 2, 0)
            label.Position = UDim2.new(-0.5, 0, -0.5, 0)
            label.BackgroundColor3 = Color3.new(0,0,0)
            label.BackgroundTransparency = 1
            label.Text = ""
            while gui and label and label.BackgroundTransparency > 0 do
                wait()
                label.BackgroundTransparency = label.BackgroundTransparency - 0.01
            end
            if player then
                player.Character:MoveTo(Dest.Position)
            end
            while gui and label and label.BackgroundTransparency < 1 do
                wait()
                label.BackgroundTransparency = label.BackgroundTransparency + 0.01
            end
            if gui then
                gui:Remove()
            end
            if player then
                if player.Character:FindFirstChild("Humanoid") then
                    player.Character.Humanoid.WalkSpeed = 16
                end
            end
        end
    end
    debounce = false
end)
astral vine
scenic ibexBOT
#

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

astral vine
#

it worked!!

#

thank you so much bro!

pine condor
#

yw :D

astral vine
#

can i like

#

vouch for you

#

idk

pine condor
#

vouch?

astral vine
#

yea like

#

shoutout idk

#

thank you for helping me @pine condor

#

or something

pine condor
#

nah man

astral vine
#

so you can get a rank in the future?

#

oh aight

pine condor
#

Glad your script is working :)

astral vine
#

well if you need anything dm me

#

tysm

pine condor
#

Okay, and if you need dm me too!